[AIServo86]
描述
Resume the suspended servo, so that the servo continues to rotate to the target angle.
語法
servo.resume()
參數
servo: Variable of the AIServo type.
回傳
無
範例
#include <AIServo86.h>
AIServoPort(ROBOTIS, AX12) bus;
AIServo myservo;
void setup()
{
bus.begin(Serial3, 1000000);
myservo. attach(bus, 3);
myservo.write(150); // turn the servo to the 150 degree position
delay(100);
}
void loop()
{
myservo.setPosition(280, 3000); // Set the target angle of the servo: 280 degrees, time: 3 seconds
myservo. run();
delay(1000);
myservo.pause(); // The servo pauses
delay(1000); // pause for 1 second
myservo.resume(); // Servo resumes rotation
delay(3000);
}參考
函式庫參考主頁面
86Duino 參考的文本是根據 知識共享署名-相同方式分享 3.0 許可證,部分文本是從 Arduino 參考 修改的。 參考中的代碼示例已發佈到公共領域。