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, pcDuino3, Raspberry Pi, Particle/Spark Core & Photon, Tessel 2, TI Launchpad and more!
20 lines (16 loc) • 404 B
JavaScript
var exec = require("child_process").exec;
var five = require("../lib/johnny-five.js");
var board = new five.Board();
board.on("ready", function() {
var lcd = new five.LCD({
controller: "JHD1313M1"
});
var color = new five.Color({
controller: "EVS_EV3",
pin: "BAS1"
});
color.on("change", function() {
lcd.bgColor(this.rgb);
// console.log("Color: ", this.rgb);
});
});