Keyestudio 4DOF Manual page 269

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

Advertisement

pos2=pos2-1;
myservo2.write(pos2);
delay(5);
if(pos2<0)
// limit the lifting angle
{
pos2=0;
}
}
// upper arm back
if(ps2x.Analog(PSS_RY)>200)
{
pos2=pos2+1;
myservo2.write(pos2);
delay(5);
if(pos2>180) // limit the declining angle
{
pos2=180;
}
}
}
//***************************************************************
void zhuazi()
{
// close the claw
if(ps2x.Analog(PSS_LX)>220)
{
// the upper arm will lift up
//if push the right joystick to downward
// the robot arm will go down
// if push the left joystick to the right
266

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents