Created
May 22, 2014 03:04
-
-
Save Resseguie/fdf327c70cab7ba6719d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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