release()
描述
釋放伺服機的出力,使伺服機處於脫力狀態。
當呼叫 run(),或者 write()、writeMicroseconds(),將會使伺服機再次出力。
語法
servo.release()
參數
servo
:Servo
型別的變數。
回傳
無
範例
#include <Servo86.h> Servo myservo; void setup() { myservo.attach(9); myservo.write(1500); // 將伺服機轉到 1500us 初始位置 delay(5000); // 延遲 5 秒 myservo.release(); // 釋放伺服機 } void loop() {}
See also
- setPosition()
- run()
The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.