Skip to content

Instantly share code, notes, and snippets.

@Resseguie
Created May 19, 2014 02:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Resseguie/0a9affc88d6c93f7d24d to your computer and use it in GitHub Desktop.
Save Resseguie/0a9affc88d6c93f7d24d to your computer and use it in GitHub Desktop.
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();
});
@Resseguie
Copy link
Author

Spark Core powered by USB. Getting a good steady cyan heartbeat on main LED.
Spark Core running VoodooSpark firmware.
Parallax CR servo powered by 6v adapter.
Grounds connected.
Expect continuous rotation, but instead get jerky servo movement in time with D7 LED strobe and an occasional short burst of steady LED with continuous rotation.

Sample Video

@rwaldron
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment