Hello world program for the Dynamixel AX12 servo motor

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "AX12.h"
00003 
00004 int main() {
00005 
00006     AX12 myax12 (p9, p10, 1);
00007 
00008     while (1) {
00009         myax12.SetGoal(0);    // go to 0 degrees
00010         wait (2.0);
00011         myax12.SetGoal(300);  // go to 300 degrees
00012         wait (2.0);
00013     }
00014 }