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!

17 lines (13 loc) 387 B
var five = require("../lib/johnny-five.js"); five.Board().on("ready", function() { var temperature = new five.Temperature({ controller: "TMP36", pin: "A0" }); temperature.on("data", function() { console.log(this.celsius + "°C", this.fahrenheit + "°F"); }); }); // @markdown // - [TMP36 - Temperature Sensor](https://www.sparkfun.com/products/10988) // @markdown