Skip to content

Instantly share code, notes, and snippets.

@Resseguie
Created May 22, 2014 03:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Resseguie/fdf327c70cab7ba6719d to your computer and use it in GitHub Desktop.
Save Resseguie/fdf327c70cab7ba6719d to your computer and use it in GitHub Desktop.
var five = require("johnny-five");
var Spark = require("../lib/spark");
var board = new five.Board({
io: new Spark({
token: process.env.SPARK_TOKEN,
deviceId: process.env.SPARK_DEVICE_ID
})
});
board.on("ready", function() {
console.log("CONNECTED");
var rgb = new five.Led.RGB({
pins: {
blue : "A5",
green : "A6",
red : "A7"
}
});
this.repl.inject({
rgb: rgb
});
rgb.pulse();
setTimeout( function(){
rgb.off();
}, 10000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment