Hi. the following prog works as expected when a servo is attached to the UNO directly.
#include <Servo.h>
#include <ALLBOT.h>
ALLBOT BOT(1); // Number of motors
enum MotorName { // Giving each motor a name
hipLeft,
hipRight,
ankleRight,
ankleLeft,
};
int speedms;
void setup()
{
// myservo.attach(1); // attaches the servo on pin 1 to the servo object
// myservo.write(90); // sets the servo position to 90° (is half of 180°)
BOT.attach(hipLeft, 11, 90, 1, 0);
// BOT.attach(hipRight, 3, 90, 0, 0);
// BOT.attach(ankleLeft, 12, 90, 1, 0);
// BOT.attach(ankleRight, 2, 90, 0, 0);
delay(500 ); // waits for the servo to get there
}
void loop()
{
BOT.move(hipLeft, 180);
// BOT.move(hipRight, 180);
BOT.animate(500);
delay(1500);
BOT.move(hipLeft, 0);
// BOT.move(hipRight, 180);
BOT.animate(500);
delay(1500);
}
But does nothing when using the shield???
the motor just turns and locks at the end. What gives?
(YES, all the shunts are on the UNO position. VRSSM shield on top of uno, with a 2 pin offset on the shield.(skipping ioref & rst) )
I cant get all 4 servos to work on the shield, as soon as I power it up all servos twist and lock on end positions using the ‘original sketch’, sound works though
ideas?