UNPKG

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, pcDuino3, Raspberry Pi, Particle/Spark Core & Photon, Tessel 2, TI Launchpad and more!

22 lines (18 loc) 758 B
var five = require("../lib/johnny-five.js"); var board = new five.Board(); board.on("ready", function() { var barometer = new five.Barometer({ controller: "MPL3115A2" }); barometer.on("data", function() { console.log("barometer"); console.log(" pressure : ", this.pressure); console.log("--------------------------------------"); }); }); // @markdown // - [MPL3115A2 - I2C Barometric Pressure/Altimiter/Temperature Sensor](https://www.adafruit.com/products/1893) // - [SparkFun Altitude/Pressure Sensor Breakout - MPL3115A2](https://www.sparkfun.com/products/11084) // - [SparkFun Weather Shield](https://www.sparkfun.com/products/12081) // - [SparkFun Photon Weather Shield](https://www.sparkfun.com/products/13630) // @markdown