Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

Resseguie commented May 19, 2014

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

This comment has been minimized.

Copy link

rwaldron commented May 19, 2014

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
You can’t perform that action at this time.