johnny-five-electron
Version:
Temporary fork to support Electron (to be deprecated)
26 lines (20 loc) • 414 B
JavaScript
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);
});