"use strict";
var Cylon = require("cylon");
Cylon
.robot()
.connection("beaglebone", { adaptor: "beaglebone" })
.device("pixel", { name: "pixel", driver: "blinkm", pin: "P9_20" })
.on("ready", function(bot) {
bot.pixel.stopScript();
bot.pixel.goToRGB(255, 0, 0);
bot.pixel.fadeToRGB(0, 255, 0);
bot.pixel.fadeToHSB(100, 180, 90);
bot.pixel.fadeToRandomRGB(0, 0, 255);
bot.pixel.fadeToRandomHSB(100, 180, 90);
bot.pixel.playLightScript(1, 0, 0);
bot.pixel.stopScript();
bot.pixel.setFadeSpeed(50);
bot.pixel.setTimeAdjust(50);
var color = bot.pixel.getRGBColor();
console.log(color);
bot.pixel.getRGBColor(function(err, data) {
if (err == null) { console.log(data); }
});
});
Cylon.start();