Keyestudio 4DOF Manual page 135

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

Advertisement

www.keyestudio.com
jiyi1[i]=s1;
// Save the read servo value to the array sequentially
jiyi2[i]=s2;
jiyi3[i]=s3;
jiyi4[i]=s4;
i++;
//i value plus 1
j=i;
// assign the last value of i to j
delay(100);
Serial.println(i);
}
}
if(z2==1) // if the left joystick key is pressed
{
delay(10);
if(z2==1)
// judge again if the left key is pressed
{
i=0; // assign i to 0,prepare for the next memory
pos1 = myservo1.read();
pos2 = myservo2.read();
pos3 = myservo3.read();
pos4 = myservo4.read();
// on the serial monitor, print out the value i
// memorize the angle value of 4 servo posture
132

Advertisement

Table of Contents
loading

Table of Contents