Keyestudio 4DOF Manual page 236

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

Advertisement

Serial.println(pos4);
myservo4.write(pos4);
delay(5);
if(pos4>108)
// limit the maximum opening angle
{
pos4=108;
}
}
}
//*********************************************************
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)
// limit the stretched angle
{
pos3=180;
}
}
if(ps2x.Analog(PSS_LY)<10)
{
pos3=pos3-1;
// servo 4 carries out the action and the claw is gradually opened
//if push the left joystick downward
233

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents