Description Resume a paused servo, allowing it to continue rotating toward the target angle. Syntax servo.resume() Parameters servo: A variable of type AIServo. Postback None Example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include <AIServo86.h> AIServoPort(ROBOTIS, AX12) bus; […]
Description Pauses a currently rotating servo. Note that the servo will still be generating power after being paused. Do not manually rotate it, as this may damage the servo. To resume the paused servo, call resume(). Syntax servo.pause() Parameters servo: A variable of type AIServo. Postback None Example 1 2 3 4 5 6 7 […]
Description Starts the servo (i.e., the servo begins to generate power). If you have previously called setPosition() to set a target angle, the servo will begin to rotate to the set angle. Note that since this function immediately generates power, avoid manually rotating the servo to avoid injury or damage. Syntax servo.run() Parameters servo: A […]
Description Dynamically sets the servo's offset angle. While the servo is running, the offset value set using this function is immediately added to the servo's target angle, causing positive or negative deviations from the original target angle. This function allows robots with sensors (gyroscopes or accelerometers) to receive feedback from them, allowing the feedback to […]
Description Sets the servo's speed. Note that this function is only valid if the rotation time has not been set. If you have already set the rotation time by calling setPosition(), the speed set by this function will have no effect. Syntax servo.setVelocity(value) Parameters servo: A variable of type AIServo. value: The servo's rotational speed, […]
Description Sets the target angle of the servo. Syntax servo.setPosition(position) servo.setPosition(position, time) Parameters servo: A variable of type AIServo. position: A floating-point number representing the target angle. For example, 90.0 indicates the target position in degrees, meaning the servo will be at 90 degrees. time (optional): The time it takes to reach the target angle. […]
Description Sets the servo's offset angle. This function can be used to fine-tune the servo's initialization angle. Once the offset value is set, the library will automatically factor it into the servo's target angle calculation. Syntax servo.setOffset(value) Parameters servo: A variable of type AIServo. value: The offset value expressed as a floating-point number, in degrees. […]
Description Reads the servo angle. Syntax servo.read() Parameters servo: A variable of type AIServo. Return The current angle of the servo. If the servo is not generating any force, the return value will be -1. (Unit: degree) Example 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 […]
Description Detaches an AIServo that has been attach() Syntax servo.detach() Parameters servo: Variable of type AIServo. Postback None See also - attach() - attached() Library Reference Home The text in the 86Duino reference material is modified from the Arduino reference material and is licensed under the Creative Commons Attribution-Share Alike 3.0 License . The code examples in the reference […]
Description Attaches the AIServo. Syntax servo.attach(bus, ID) Parameters servo: A variable of type AIServo. bus: The object declared by the AIServoPort(Vendor, Servo). ID: The ID of the servo. Postback None Example 1 2 3 4 5 6 7 8 9 10 11 12 #include <AIServo86.h> AIServoPort(ROBOTIS, AX12) bus; AIServo myservo; void setup() { […]