Keyestudio 4DOF Manual page 225

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

Advertisement

www.keyestudio.com
// 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)
{
pos4=pos4-1;
Serial.println(pos4);
myservo4.write(pos4);
gradually closed.
//if push the right joystick downward
// the upper arm will go down
// if push the left joystick to the right
// servo 4 carries out the action and the claw is
222

Advertisement

Table of Contents
loading

Table of Contents