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!

13 lines (9 loc) 283 B
var five = require("../lib/johnny-five.js"); var board = new five.Board(); board.on("ready", function() { var slider = new five.Sensor("A0"); // "slide" is an alias for "change" slider.scale([0, 100]).on("slide", function() { console.log("slide", this.value); }); });