Keyestudio 4DOF Manual page 216

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

Advertisement

www.keyestudio.com
{
//Serial.println("L3 pressed");
i=0;
//执行
pos1 = myservo1.read();
pos2 = myservo2.read();
pos3 = myservo3.read();
pos4 = myservo4.read();
for(int k=0;k<j;k++) //for loop, to execute all the stored actions
{
if(pos1<jiyi1[k])
in array 1.
{
while(pos1<jiyi1[k])
value stored in the array.
{
myservo1.write(pos1);
delay(5);
pos1++;
//Serial.println(pos1);
}
//if the current servo 1 angle is less than the value stored
//while loop, make servo turn to the position of
// servo 1 executes the action
// delay 5ms,controlling the rotating speed of servo
213

Advertisement

Table of Contents
loading

Table of Contents