Set goal angle in integer degrees, in positional mode.
void
MultSetGoal (int degrees1, float speed1, int degrees2, float speed2, int degrees3, float speed3, int degrees4, float speed4, int degrees5, float speed5, int degrees6, float speed6, int degrees7, float speed7, int degrees8, float speed8, int degrees9, float speed9, int degrees10, float speed10, int degrees11, float speed11, int degrees12, float speed12, int degrees13, float speed13, int degrees14, float speed14, int degrees15, float speed15, int degrees16, float speed16, int degrees17, float speed17, int degrees18, float speed18)
Set the position and speed of 18 servo from ID 1-18 at the same time.
Servo control class for AX12 and other compatible Dynamixel servo.
Example:
#include "mbed.h" #include "AX12.h"int main() {
// The controlled servo has ID = 1// Connected to pin p9 as TX and p10 as RX// p11 used as toggle between TX and RX mode// The baudrate used to communicate with servo is 1 000 000AX12 myax12 (p9, p10, p11, 1, 1000000);
while (1) {
myax12.SetGoal(0); // go to 0 degrees
wait (2.0);
myax12.SetGoal(300); // go to 300 degrees
wait (2.0);
}
}
If a servo ID is not know, the broadcast address of 254 (0xFE) can be used for CurrentID. In this situation, only one servo should be connected to the bus
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.