EasyManua.ls Logo

Keyestudio 4DOF - Page 156

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...
153
if(pos3>180) // limit the stretched angle
{
pos3=180;
}
}
if(y2>1000) // if push the left joystick downward
{
pos3=pos3-1;
myservo3.write(pos3); // lower arm will draw back
delay(5);
if(pos3<35) // limit the retracted angle
{
pos3=35;
}
}
}
***************************************************************************************************************************
Test Result:
Upload the code to main board and stack the shield onto it. Wire it up, 4DOF robot arm will keep the initial position,
push the two Joysticks to operate the robot arm.

Related product manuals