Last active
August 29, 2015 14:01
-
-
Save Resseguie/21d83c60511789f51a23 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("spark-io"); | |
var board = new five.Board({ | |
io: new Spark({ | |
token: process.env.SPARK_TOKEN, | |
deviceId: process.env.SPARK_DEVICE_ID | |
}) | |
}); | |
board.on("ready", function() { | |
var led = new five.Led(process.argv[2] || "D7"); | |
this.repl.inject({ | |
led: led | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Throws error from spark.js:
I added a couple debug statements and pin is of type number, mode == 1.