Hi I am trying to multiple led's in cylon.js but it's throws an error can any one please give exact code that how to do
SampleCode:
"use strict";
var Cylon = require("cylon");
Cylon.robot({
connections: {
leap: { adaptor: "leapmotion" },
arduino: { adaptor: "firmata", port: "COM6" }
},
devices: {
led: { driver: "led", pin: 13, connection: "arduino" },
leapmotion: {driver: "leapmotion", connection: "leap"}
},
work: function(my) {
my.leapmotion.on("frame", function(frame) {
if (frame.hands.length > 0) {
my.led.turnOn();
} else {
my.led.turnOff();
}
});
}
}).start();
Thanks