Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Homepage
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: