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

History

bug fix default tip

2014-08-26, by kochansky [Tue, 26 Aug 2014 20:07:47 +0000] rev 10

bug fix


setSpeed and setAcceleration for all channels

2014-08-25, by kochansky [Mon, 25 Aug 2014 19:22:10 +0000] rev 9

setSpeed and setAcceleration for all channels


working version

2014-01-07, by kochansky [Tue, 07 Jan 2014 18:35:25 +0000] rev 8

working version


almost done!

2014-01-06, by kochansky [Mon, 06 Jan 2014 16:45:21 +0000] rev 7

almost done!


fixed multiple servos

2014-01-06, by kochansky [Mon, 06 Jan 2014 13:16:37 +0000] rev 6

fixed multiple servos


multiple servos

2014-01-06, by kochansky [Mon, 06 Jan 2014 11:14:19 +0000] rev 5

multiple servos


setServoAngle

2014-01-05, by kochansky [Sun, 05 Jan 2014 17:24:40 +0000] rev 4

setServoAngle


working

2014-01-05, by kochansky [Sun, 05 Jan 2014 16:46:14 +0000] rev 3

working


serial init

2014-01-05, by kochansky [Sun, 05 Jan 2014 10:52:17 +0000] rev 2

serial init


setTarget

2014-01-05, by kochansky [Sun, 05 Jan 2014 10:40:26 +0000] rev 1

setTarget