Keyestudio 4DOF Manual page 162

Robot mechanical arm kit for arduino diy
Hide thumbs Also See for 4DOF:
Table of Contents

Advertisement

pos1++; //pos1 plus 1
delay(5); // delay for 5ms,controlling the rotation speed of servo.
}
}
else // if angle of servo 1 is greater than the value stored in array 1.
{
while(pos1>s1)
//while loop,rotate the servo to the position of the value stored in the array.
{
myservo1.write(pos1); // servo 1 operates the motion
pos1--;
//pos1 subtracts 1
delay(5);
// delay for 5ms,controlling the rotation speed of servo.
}
}
//*************************************************
// the explanation is the same as servo 1
if(pos2<s2)
{
while(pos2<s2)
{
myservo2.write(pos2);
pos2++;
delay(5);
}
}
else
159

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents