Keyestudio 4DOF Manual page 195

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

Advertisement

{
myservo4.write(pos4);
delay(5);
pos4--;
//Serial.println(pos1);
}
}
}
//************************************************************
// for exiting the loop
z1 = digitalRead(right_key); // read the right Z value
if(z1==1) // if the right key is pressed
{
delay(10); //eliminate the shake
if(z1==1) // if the key z1 is pressed
{
pos1=jiyi1[(j-1)]; // assign the last angle value saved in array to pos
pos2=jiyi2[(j-1)]; // for exiting the loop, still access to joystick control.
pos3=jiyi3[(j-1)];
pos4=jiyi4[(j-1)];
i=0; // assign i as 0,prepare for saving the angle value using array
z2=0; // assign z2 as 0,for exiting the while loop
break; //exit the current loop
}
}
//********************************************************
192

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents