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!

16 lines (12 loc) 278 B
var five = require("../lib/johnny-five.js"); var board = new five.Board(); board.on("ready", function() { var motor = new five.Motor({ pins: { pwm: 5, dir: 4 } }); this.repl.inject({ motor: motor }); // Speed is an 8bit value: 0-255 motor.speed(255); });