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!
15 lines (12 loc) • 350 B
JavaScript
var five = require("../");
var board = new five.Board();
board.on("ready", function() {
var barometer = new five.Barometer({
controller: "BMP180"
});
barometer.on("change", function() {
console.log("barometer");
console.log(" pressure : ", this.pressure);
console.log("--------------------------------------");
});
});