I am working on assembling the ROFI robot from Project Biped (http://www.projectbiped.com/prototypes/rofi) and I have not been able to run any arduino program as they will not function correctly.
To be more specific, when I attempt to run 12 servos on a single Arduino Mega, the servos twitch uncontrollably and do not move to the positions which are set in the program. At the same time the power light on the arduino mega blinks and does not turn solid (as opposed to if I use less than 11 servos when the pwr light is solid). I predict it might be the power source but after checking the batteries with the multimeter they check out to be fine (7.6 V). The circuit is pretty simple, I am using a servo shield connected to a 6V regulator connected in parallel to two 7.2 V 1350 mah LiPo batteries. The arduino is connected through the dc power jack to the same circuit in parallel.
Here is the code...
#include <Servo.h>
// 0 Right Ankle (roll)
// 1 Right Lower Leg
// 2 Right Knee
// 3 Right Middle Leg
// 4 Right Upper Leg
// 5 Right Hip (roll)
//LEFT LEG JOINTS
// 6 Left Ankle (roll)
// 7 Left Lower Leg
// 8 Left Knee
// 9 Left Middle Leg
// 10 Left Upper Leg
// 11 Left Hip (roll)
int c=0;
Servo rightAnkle;
Servo lowerLeg;
Servo rightKnee;
Servo rightMiddleLeg;
Servo rightUpperLeg;
Servo rightHip;
Servo leftAnkle;
Servo leftLowerLeg;
Servo leftKnee;
Servo leftMiddleLeg;
Servo leftUpperLeg;
Servo leftHip;
void setup(){
rightAnkle.attach(0);
lowerLeg.attach(1);
rightKnee.attach(2);
rightMiddleLeg.attach(3);
rightUpperLeg.attach(4);
rightHip.attach(5);
leftAnkle.attach(6);
leftLowerLeg.attach(7);
//leftKnee.attach(8);
//leftMiddleLeg.attach(9);
leftUpperLeg.attach(10);
leftHip.attach(11);
}
void loop(){
rightAnkle.write(90);
lowerLeg.write(90);
rightKnee.write(90);
rightMiddleLeg.write(90);
rightUpperLeg.write(90);
rightHip.write(100);
leftAnkle.write(90);
leftLowerLeg.write(90);
leftKnee.write(90);
leftMiddleLeg.write(90);
leftUpperLeg.write(90);
leftHip.write(90);
}