Library for Pololu Maestro Servo Controller http://www.pololu.com/docs/0J40

Library for Pololu Maestro Servo Controller

Library docs: https://developer.mbed.org/users/kochansky/code/Maestro/docs/f374c7b60318/classMaestro.html

Example usage:

#include "mbed.h"
#include "Maestro.h"

Maestro maestro(PTC4,PTC3);

int main()
{
    maestro.setBaudRate(9600);

    // limit speed for each servo
    for (uint8_t i = 0; i < 17; i++) {
        maestro.setSpeed(i, 10);
    }

    while (true) {
       // set servo on channel 0 to 90 degrees
       maestro.setServoAngle(0, 90);
       wait(2);

        // set servo on channel 0 to 45 degrees
       maestro.setServoAngle(0, 45);
       wait(2);
    }
}

Serial commands based on manual: http://www.pololu.com/docs/0J40/5.e

Device pinout:

/media/uploads/kochansky/maestro.jpg

Revision:
2:39356b408262
Parent:
1:c14b79e3f39b
Child:
3:1c654893354d
diff -r c14b79e3f39b -r 39356b408262 Maestro.h
--- a/Maestro.h	Sun Jan 05 10:40:26 2014 +0000
+++ b/Maestro.h	Sun Jan 05 10:52:17 2014 +0000
@@ -53,7 +53,7 @@
     //void setMultipleTargets(int* channels, int* targets);
 
     /**
-     * Limits the speed at which a servo channel’s output value changes
+     * Limits the speed at which a servo channel's output value changes
      *
      * @param channel - number of a servo channel
      * @param speed - speed of the servo in units of 0.25 μs / (10 ms)
@@ -61,7 +61,7 @@
     void setSpeed(int channel, int speed);
 
     /**
-     * Limits the acceleration of a servo channel’s output
+     * Limits the acceleration of a servo channel's output
      *
      * @param channel - number of a servo channel
      * @param acceleration - acceleration of the servo in units of (0.25 μs) / (10 ms) / (80 ms)