Hello!
I've been attempting to run a simple servo command while simultaneously turning on/off an LED (obviously I'm pretty new at this). I cannot seem to have the servo running and the led on at the same time and I'm not sure why. I'm using johnny-five, I am not using a servo module (figured I didn't need if powering only 1 servo?), and I've powered it with both 4 AA batteries and usb to a wall outlet (same result).
board.on("ready", function() {
const led = new five.Led('b6');
const servo = new five.Servo({
pin: 'a6',
type: "continuous"
});
// -- does not work at same time --
// servo.cw(0);
// led.on();
// -- works --
setInterval(() => {
led.stop();
servo.cw(1);
setTimeout(()=> {
servo.stop();
led.on();
}, 1000)
}, 2000)
Can anyone shed some light as to what I've done wrong or why this may not be working as intended?