```var tessel = require('tessel');
// if you're using a si7020 replace this lib with climate-si7020
var climatelib = require('climate-si7020');
var climate = climatelib.use(tessel.port['C']);
climate.on('ready', function () {
console.log('Connected to si7005');
// Loop forever
setImmediate(function loop () {
climate.readTemperature('f', function (err, temp) {
climate.readHumidity(function (err, humid) {
console.log('Degrees:', temp.toFixed(4) + 'F', 'Humidity:', humid.toFixed(4) + '%RH');
setTimeout(loop, 300);
});
});
});
});
climate.on('error', function(err) {
console.log('error connecting module', err);
});
$ tessel run climate.js
TESSEL! Connected to TM-00-04-f0009a30-0067433c-404445c2.
INFO Bundling directory /Users/john/mysrc/weisjohn/tessel-code
/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/src/bundle.js:115
throw e;
^
TypeError: Cannot read property 'usesContinue' of undefined
at Object.finishNode as closeNode
at finishNode (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1059:30)
at parseStatement (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1182:14)
at parseBlock (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1391:18)
at parseStatement (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1340:14)
at parseStatement (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1234:25)
at parseBlock (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1391:18)
at parseStatement (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1340:14)
at parseStatement (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1234:25)
at parseBlock (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1391:18)
$ which node
/Users/john/.nvm/versions/node/v0.12.7/bin/node
using this file, climate.js:
$ tessel run climate.js TESSEL! Connected to TM-00-04-f0009a30-0067433c-404445c2. INFO Bundling directory /Users/john/mysrc/weisjohn/tessel-code /Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/src/bundle.js:115 throw e; ^ TypeError: Cannot read property 'usesContinue' of undefined at Object.finishNode as closeNode at finishNode (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1059:30) at parseStatement (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1182:14) at parseBlock (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1391:18) at parseStatement (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1340:14) at parseStatement (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1234:25) at parseBlock (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1391:18) at parseStatement (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1340:14) at parseStatement (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1234:25) at parseBlock (/Users/john/.nvm/versions/node/v0.12.7/lib/node_modules/tessel/node_modules/colony-compiler/src/acorn_mod.js:1391:18)
$ which node /Users/john/.nvm/versions/node/v0.12.7/bin/node