[AIServo86]
Description
Resume multiple suspended servos simultaneously, so the servos can continue to rotate to the target position. After calling this function, the behavior of each servo is the same as the behavior of calling resume().
Syntax
aiservoMultiResume()
aiservoMultiResume(servo1)
aiservoMultiResume(servo1, servo2)
aiservoMultiResume(servo1, servo2, ... , servo64)
Parameters
servo1 ~ servo64: Variable of AIServo type.
You can enter 1 to 64 servo-type parameters to specify the servo to be activated or enter no parameters; when no parameters are entered, it means that all suspended servos are to be restored.
Returns
None.
Example
#include <AIServo86.h>
AIServoPort(ROBOTIS, AX12) bus;
AIServo servo0;
AI Servo servo1;
void setup()
{
bus.begin(Serial1, 1000000);
servo0. attach(bus, 6);
servo1. attach(bus, 10);
servo0.setPosition(150);
servo1.setPosition(160);
aiservoMultiRun(servo0, servo1); // start servo0, servo1 servos
delay(500);
}
void loop()
{
servo0.setPosition(90, 2000);
servo1.setPosition(200, 2000);
aiservoMultiRun(servo0, servo1); // make servo0, servo1 rotate to the new target position
delay(1000);
aiservoMultiPause(servo0, servo1); // pause all servos
delay(3000); // pause for 3 seconds
aiservoMultiResume(servo0, servo1); // All servos resume rotation
while(isAIServoMultiMoving() == true); // wait for all servos to go to target position
servo0.setPosition(150, 2000);
servo1.setPosition(160, 2000);
aiservoMultiRun(servo0, servo1); // make servo0, servo1 rotate to the new target position
while(isAIServoMultiMoving() == true); // wait for all servos to go to target position
}See also
Libraries Reference Home
The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.