Keyestudio 4DOF Manual page 120

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

Advertisement

www.keyestudio.com
while(pos1<s1)
the array.
{
myservo1.write(pos1); // servo 1 operates the motion
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)
the array.
{
myservo1.write(pos1); // servo 1 operates the motion
pos1--;
delay(5);
}
}
//*************************************************
// the explanation is the same as servo 1
if(pos2<s2)
//while loop,rotate the servo to the position of the value stored in
//while loop,rotate the servo to the position of the value stored in
//pos1 subtracts 1
// delay for 5ms,controlling the rotation speed of servo.
117

Advertisement

Table of Contents
loading

Table of Contents