1 2/* 3Please add this section into app.json when run this script as app.js. 4This configuration is designed for haas100 edu k1. 5"si7006": { 6 "type": "I2C", 7 "port": 1, 8 "addrWidth": 7, 9 "freq": 400000, 10 "mode": "master", 11 "devAddr": 64 12} 13*/ 14 15console.log('testing si7006...'); 16 17var si7006 = require('./si7006.js'); 18 19si7006.init("si7006"); 20 21var version = si7006.getVer(); 22console.log("Si7006 version is: " , version); 23 24var chipID = si7006.getID(); 25console.log("Si7006 chipid is: " , chipID); 26 27var temperature = si7006.getTemperature(); 28console.log("Temperature is: " , temperature); 29 30var humidity = si7006.getHumidity(); 31console.log("Humidity is: " , humidity); 32 33si7006.deinit(); 34console.log("test si7006 success!"); 35