I am completely new to Arduinos and using the maestro 12, so sorry if my problem is something stupid.
I am controlling 8 of the HS-755 HB servos with the maestro. I am using a 6V, 3000 mAh, 5 cell battery to power the servo controller. The uno is connected to the maestro through the serial pins. I am running the following simple script to move the servos to a basic position and maintaining it:
#include <PololuMaestro.h>
MicroMaestro maestro(Serial);
void setup()
{
Serial.begin(9600);
maestro.reset();
delay(1000);
maestro.setSpeed(0, 20);
maestro.setAcceleration(0, 5);
maestro.setSpeed(1, 20);
maestro.setAcceleration(1, 5);
maestro.setSpeed(3, 20);
maestro.setAcceleration(3, 5);
maestro.setSpeed(4, 20);
maestro.setAcceleration(4, 5);
maestro.setSpeed(6, 20);
maestro.setAcceleration(6, 5);
maestro.setSpeed(7, 20);
maestro.setAcceleration(7, 5);
maestro.setSpeed(9, 20);
maestro.setAcceleration(9, 5);
maestro.setSpeed(10, 20);
maestro.setAcceleration(10, 5);
}
void loop()
{
maestro.setTarget(0, 6008);
maestro.setTarget(1, 5984);
maestro.setTarget(3, 6184);
maestro.setTarget(4, 6128);
maestro.setTarget(6, 6016);
maestro.setTarget(7, 5896);
maestro.setTarget(9, 5684);
maestro.setTarget(10, 6060);
delay(1000);
}
The servos will go to the desired position and jitter and try and jerk to the desired position. Sometimes they will successfully hold that position for a short time. If I remove the delay in the control loop all servos will remain relatively close to the desired position, but will jittering uncontrollably. In either case, the red LED on the maestro is on.
However, as soon as I plug my laptop into the maestro and moniter the error log while the Arduino is communicating with the maestro, the maestro works perfectly and all the servos go to the desired positions no problem - no errors listed. Do you guys have any idea what the problem is?
Thanks in advance!