Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Spark-IO RGB LED with timeout
var five = require("johnny-five"),
Spark = require("spark-io"),
board = new five.Board({
io: new Spark({
token: process.env.SPARK_TOKEN,
deviceId: process.env.SPARK_DEVICE_ID
// The board's pins will not be accessible until
// the board has reported that it is ready
board.on("ready", function() {
var led = new five.Led.RGB({
pins: {
red: "A5",
green: "A6",
blue: "A7"
setTimeout(function() {
board.on("error", function(error) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.