Created
May 19, 2014 02:31
-
-
Save Resseguie/0a9affc88d6c93f7d24d to your computer and use it in GitHub Desktop.
This file contains hidden or 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("D7"); | |
led.strobe(1000); | |
console.log("Let's go CW!"); | |
var servo_pin = new five.Servo({ pin: "D1", type: 'continuous' }).stop(); | |
servo_pin.cw(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok, so I worked through recreating this example. There were a few tweaks to spark-io and johnny-five, but nothing that should have a major impact. Can you update to all the latest versions of all the things and let me know how it goes? Thanks!