Skip to content

Instantly share code, notes, and snippets.

@voodootikigod
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voodootikigod/c936e1c9a83083e4a550 to your computer and use it in GitHub Desktop.
Save voodootikigod/c936e1c9a83083e4a550 to your computer and use it in GitHub Desktop.
var Spark = require("../../spark-io");
var board = new Spark({
token: process.env.SPARK_TOKEN,
deviceId: process.env.SPARK_DEVICE_ID
});
board.on("ready", function() {
console.log("CONNECTED");
this.pinMode("D1", this.MODES.OUTPUT);
this.pinMode("D0", this.MODES.OUTPUT);
// Analog write to a digital pin for Servos
this.analogWrite("D1", 4);
this.analogWrite("D0", 254);
// This should just make the continuous servo turn
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment