Keyestudio 4DOF Manual page 126

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

Advertisement

www.keyestudio.com
if(pos1<1)
// limit the angle when turn right
{
pos1=1;
}
}
if(x1>1000) // if push the right joystick to the left
{
pos1=pos1+1; //pos1 plus 1
myservo1.write(pos1); // robot arm turns left
delay(5);
if(pos1>180) // limit the angle when turn left
{
pos1=180;
}
}
}
//**********************************************************/
// upper arm
void xiaobi()
{
if(y1>1000) // if push the right joystick upward
123

Advertisement

Table of Contents
loading

Table of Contents