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!
16 lines (13 loc) • 372 B
JavaScript
var five = require("../lib/johnny-five.js");
var board = new five.Board();
board.on("ready", function() {
var hygrometer = new five.Hygrometer({
controller: "HTU21D"
});
hygrometer.on("data", function() {
console.log(this.relativeHumidity + " %");
});
});
// @markdown
// - [HTU21D - Humidity Sensor](https://www.adafruit.com/products/1899)
// @markdown