Servo control no longer functional
rwaldron opened this issue · 7 comments
rwaldron commented
This used to work, now it doesn't.
voodootikigod commented
will dig into it!
voodootikigod commented
can you provide sample code?
makenai commented
Glad it wasn't just me. I think I might have run into the same issue and was mid-debugging.
makenai commented
Here's what I was doing - simple hack on my original sumobot example code:
rwaldron commented
var five = require("../lib/johnny-five.js");
var Spark = require("spark-io");
var board = new five.Board({
io: new Spark({
token: "...",
deviceId: "..."
})
});
board.on("ready", function() {
var sc = new five.Servo.Continuous("D5");
sc.cw();
});
w/o Johnny-Five
var Spark = require("../lib/spark");
var board = new Spark({
token: "...",
deviceId: "..."
});
board.on("ready", function() {
console.log("CONNECTED");
this.pinMode("D5", this.MODES.SERVO);
// Analog write to a digital pin for Servos
this.analogWrite("D5", 150);
// This should just make the continuous servo turn
});
voodootikigod commented