EasyManua.ls Logo

Keyestudio 4DOF - Page 154

Keyestudio 4DOF
276 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
151
if(pos1<1) // limit the angle when turn right
{
pos1=1;
}
}
if(x1>1000) // if push the right joystick to the let
{
pos1=pos1+1; //pos1 plus 1
myservo1.write(pos1); // 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
{
pos2=pos2-1;
myservo2.write(pos2); // the upper arm will lift
delay(5);

Related product manuals