Keyestudio 4DOF Manual page 124

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

Advertisement

www.keyestudio.com
xiaobi();
// lower arm
dabi();
}
//claw
void zhuazi()
{
//claw
if(x2<50) // if push the left joystick to the right
{
pos4=pos4-2; // current angle of servo 4 subtracts 2(change the value you subtract, thus
change the closed speed of claw)
//Serial.println(pos4);
myservo4.write(pos4); //servo 4 operates the action, claw is gradually closed
delay(5);
if(pos4<2) // if pos4 value subtracts to 2, the claw in 37 degrees we have tested is closed.)
{
pos4=2;
}
}
//(should change the value based on the fact)
// stop subtraction when reduce to 2
121

Advertisement

Table of Contents
loading

Table of Contents