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!

8 lines (6 loc) 201 B
var five = require("../lib/johnny-five.js"); new five.Board().on("ready", function() { new five.Sensor("I0").scale(0, 255).on("data", function() { console.log(Math.round(this.value)); }); });