Keyestudio 4DOF Manual page 139

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

Advertisement

void loop()
{
// turn right
for(pos1;pos1>0;pos1--)
{
myservo1.write(pos1);
delay(5);
// delay 5ms(used to adjust the servo speed)
}
delay(1000);
// open the claw
for(pos4;pos4<100;pos4++)
{
myservo4.write(pos4);
}
delay(1000);
// right servo rotates to 100 degrees
for(pos2;pos2>50;pos2--)
{
myservo2.write(pos2);
delay(5);
}
// left servo rotates to 5 degrees
for(pos3;pos3>50;pos3--)
136

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

Subscribe to Our Youtube Channel

Table of Contents

Save PDF