Keyestudio 4DOF Manual page 227

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

Advertisement

www.keyestudio.com
void dabi()
{
// lower arm front
if(ps2x.Analog(PSS_LY)>200) // if push the left joystick upward
{
pos3=pos3+1;
myservo3.write(pos3); // the lower arm will stretch out
delay(5);
if(pos3>180)
{
pos3=180;
}
}
if(ps2x.Analog(PSS_LY)<10)
{
pos3=pos3-1;
myservo3.write(pos3);
delay(5);
if(pos3<35)
{
pos3=35;
}
// limit the stretched angle
// if push the left joystick downward
//the lower arm will retract
// limit the retracted angle
224

Advertisement

Table of Contents
loading

Table of Contents