Skip to content

Instantly share code, notes, and snippets.

@johnnyman727
Created October 14, 2014 02:35
Show Gist options
  • Save johnnyman727/d959f007c3c247d3232d to your computer and use it in GitHub Desktop.
Save johnnyman727/d959f007c3c247d3232d to your computer and use it in GitHub Desktop.
Many Modules
require('tesselate')(['ble-ble113a', 'climate-si7020', 'ambient-attx4', 'camera-vc0706'], function(tessel, modules) {
console.log('connected!');
modules.climate.readTemperature(message, function (err, temp) {
modules.climate.readHumidity(function (err, humid) {
console.log(temp + ":" + humid);
modules.ambient.getLightLevel(function (err, ldata) {
if (err)
throw err;
modules.ambient.getSoundLevel(function (err, sdata) {
console.log(ldata + ":" + sdata);
});
});
});
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment