Here is my sketch:
[code]#include <Servo.h>
#include <ALLBOT.h>
ALLBOT BOT(8); //number of motors
enum MotorName {
hipFrontLeft,
hipFrontRight,
hipRearLeft,
hipRearRight,
kneeFrontLeft,
kneeFrontRight,
kneeRearLeft,
kneeRearRight
};
int sounderPin = 13;
void setup() {
//INIT sounder
pinMode(sounderPin, OUTPUT);
// Chirp for begin
chirp(2, 25);
chirp(3, 200);
//NAME.attach(motorname, pin, init-angle, flipped, offset-angle);
BOT.attach(hipFrontLeft, A1, 45, 0, 0);
BOT.attach(hipFrontRight, A0, 45, 1, 0);
BOT.attach(hipRearLeft, 9, 45, 1, 0);
BOT.attach(hipRearRight, 4, 45, 0, 0);
BOT.attach(kneeFrontLeft, 11, 45, 1, 0);
BOT.attach(kneeFrontRight, 23, 45, 0, 0);
BOT.attach(kneeRearLeft, 10, 45, 1, 0);
BOT.attach(kneeRearRight, 3, 45, 0, 0);
//wait for joints to be initialized
delay(500);
// Chirp for ready
chirp(1, 50);
chirp(1, 255);
chirp(3, 0);
}
void loop() {
// put your main code here, to run repeatedly:
}
void chirp(int beeps, int speedms){
for (int i = 0; i < beeps; i++){
for (int i = 0; i < 255; i++){
digitalWrite(sounderPin, HIGH);
delayMicroseconds((355-i) + (speedms2));
digitalWrite(sounderPin, LOW);
delayMicroseconds((355-i) + (speedms2));
}
delay(30);
}
}[/code]
I used the VRBS1 shield and I also tried an external 9 V, 6 W power supply.
There was no difference in the working of the program.