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 (13 loc) • 376 B
JavaScript
var five = require("../lib/johnny-five");
five.Board().on("ready", function() {
var temperature = new five.Temperature({
controller: "LM335",
pin: "A0"
});
temperature.on("data", function() {
console.log(this.celsius + "°C", this.fahrenheit + "°F");
});
});
// @markdown
// - [LM335 - Temperature Sensor](http://www.ti.com/product/lm335)
// @markdown