Keyestudio 4DOF Manual page 197

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

Advertisement

{
//(should change the value based on the fact)
pos4=2;
//stop subtraction when reduce to 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 action, claw gradually opens.
delay(5);
if(pos4>90) //limit the largest angle opened
{
pos4=90;
}
}
}
//******************************************************
//turn
void zhuandong()
{
if(x1<50) //if push the right joystick to the right
{
pos1=pos1-1; //pos1 subtracts 1
myservo1.write(pos1); // servo 1 performs the action, the robot arm turns right.
delay(5);
if(pos1<1)
// limit the right turning angle
194

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 4DOF and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF