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, Raspberry Pi, Spark Core, TI Launchpad and more!

15 lines (11 loc) 228 B
var five = require("../"); var board = new five.Board(); board.on("ready", function() { var pin = new five.Sensor({ pin: 8, type: "digital" }); pin.on("data", function() { console.log(this.value); }); });