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!

12 lines (8 loc) 246 B
var five = require("../lib/johnny-five.js"); var board = new five.Board(); board.on("ready", function() { var slider = new five.Sensor("A0"); slider.scale(0, 100).on("slide", function() { console.log(Math.floor(this.value)); }); });