if(y2<50) // if push the left joystick downward
{
pos3=pos3+1;
myservo3.write(pos3); // the lower arm will draw back
delay(5);
if(pos3>180)
// limit the retracted angle
{
pos3=180;
}
}
}
**********************************************************************************************************************************
Test Result:
Wire it up, stack the shield onto UNO R3, upload the code. Powered on, press the key Z1 of right Joystick to save
the angle value of 4 servos control. Press the key Z2 of left Joystick to operate a servo posture saved in the
variable.
166
Need help?
Do you have a question about the 4DOF and is the answer not in the manual?
Questions and answers