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 (10 loc) 262 B
var five = require("../lib/johnny-five.js"); new five.Board().on("ready", function() { var servo = new five.Servo({ pin: "O0", type: "continuous" }); new five.Sensor("I0").scale(0, 1).on("change", function() { servo.cw(this.value); }); });