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!

26 lines (20 loc) 414 B
var five = require("../lib/johnny-five.js"); var board = new five.Board(); board.on("ready", function() { var anode = new five.Led.RGB({ pins: { red: 6, green: 5, blue: 3 }, isAnode: true }); // Add led to REPL (optional) this.repl.inject({ anode: anode }); // Turn it on and set the initial color anode.on(); anode.color("#FF0000"); anode.blink(1000); });