I want to find...

Search

Shares

Table of Content

AIServo.release()

[AIServo86]

Description

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() and 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

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.

Leave a Comment

Scroll to Top