AIServo.release()

[AIServo86]

描述

After releasing a specified servo and calling this function, the servo will stop immediately.

After releasing the servo, it will return to the attach() state. You must set the target angle again and call one of run() 以及 write() to make the servo start rotating.

語法

servo.release()

參數

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 150 degrees
   delay(3000); // delay for 3 seconds
   myservo.release(); // Release the servo
}
 
void loop() {}

參考


函式庫參考主頁面

86Duino 參考的文本是根據 Creative Commons Attribution-ShareAlike 3.0 License,部分文本是從 the Arduino reference 修改的。 參考中的代碼示例已發佈到公共領域。

發表評論

上部へスクロール