johnny-five
Version:
The JavaScript Robotics and Hardware Programming Framework. Use with: Arduino (all models), Electric Imp, Beagle Bone, Intel Galileo & Edison, Linino One, Pinoccio, Raspberry Pi, Spark Core, TI Launchpad and more!
17 lines (14 loc) • 303 B
JavaScript
var five = require("../");
var Tessel = require("tessel-io");
var board = new five.Board({
io: new Tessel()
});
board.on("ready", function() {
var temp = new five.Temperature({
controller: "SI7020",
port: "A"
});
temp.on("change", function() {
console.log(this.celsius);
});
});