Keyestudio 4DOF Manual page 110

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

Advertisement

www.keyestudio.com
delay(5);
if(pos4<2) // if pos4 value subtracts to 2, the claw in 37 degrees we have tested is closed.
{
pos4=2;
}
}
if(x2>1000) //// if push the left joystick to the left
{
pos4=pos4+8; // current angle of servo 4 plus 8(change the value you plus, thus change
the open speed of claw)
//Serial.println(pos4);
myservo4.write(pos4); // servo 4 operates the motion, the claw gradually opens.
delay(5);
if(pos4>108) // limit the largest angle when open the claw
{
pos4=108;
}
}
}
//******************************************************
// turn
void zhuandong()
//(should change the value based on the fact)
// stop subtraction when reduce to 2
107

Advertisement

Table of Contents
loading

Table of Contents