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.

Syntax

servo.release()

Parameters

servo: Variable of the AIServo type.

Returns

None.

Example

#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() {}

See also


Libraries Reference Home

86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。

コメントする

上部へスクロール