We are trying to program an Arduino arm but are having trouble getting it to move properly.The main focus is to have each section of the arm move independently and in a sequence using servo motors.
Here is a photo of the arm:
We would like each part of it to move up and down a certain angle value.
Here is the code we have written for the two bottom motors:
for(pos2=0; pos2<=-20; pos2+=20)
for(pos15 =0; pos15<= 110; pos15 +=110)
for(pos15=0; pos15>=45; pos15 -= 45)
for(pos1=0; pos1>= 40; pos1 -=40)
When we run it, the servos would go to 90 degrees. If the arm was pushed up, it did go to 20 degrees, but only when pushed. It did not move from 20 degrees to zero degrees at all.