AIServo constructor



Initialize the AIServo object.


AIServo myservo




#include <AIServo86.h>
AIServoPort(ROBOTIS, AX12) bus; // Initialize bus to control ROBOTIS AX-12 servo
AIServo myservo; // initialize myservo
void setup()
   bus.begin(Serial1, 1000000); // Set the serial port used by the bus as Serial1, and the baud rate as 1000000
   myservo.attach(bus, 9); // mount myservo to the bus, and the ID of myservo is 9
   myservo.write(150); // start the servo and turn it to 150 degrees
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

Your email address will not be published. Required fields are marked *

Scroll to Top