I wonder a 6 legs design will be cooler
Hexapods are pretty common these days, have a look at these
I think they may be easier to drive because you can always have three legs on the ground.
@extentionex
You have to compartmentalise the code, as it is it's too hard to figure out. Write and debug small functions that move a leg in various specific ways and take a leg # as a parameter, then your code will look more readable. eg
loop () {
liftLeg(1);
moveLeg(1, BACK);
lowerLeg(1);
liftLeg(2);
moveLeg(2, FORWARD);
lowerLeg(2);
liftLeg(3);
moveLeg(3, BACK);
lowerLeg(3);
liftLeg(3);
moveLeg(4, FORWARD);
lowerLeg(3);
}
Then remove this and place it in a function call moveForward() or whatever.
On other word try to write and debug small pieces of code at a time then combine them into human-readable sequences. As it is with a 1000 for loops it's just too hard to decipher and therefore debug.
So put the bot on a pedestal with legs off the ground, get one leg working as you think it should and work from there.
Also check out these forums
There are guys there more into robots then the average member here.
Rob