Version: 1.0.0
Release date: 2015 Jan 12
www.pololu.com
This is a library for the Arduino IDE that helps interface with a Maestro Servo Controller. It communicates with Maestros using the Serial Protocol described in the Maestro Servo Controller User's Guide Section 5, "Serial Interface".
This library is designed to work with the Arduino IDE versions 1.0.x or later and will probably not work with older versions. This library supports any Arduino-compatible board, including the Pololu A-Star 32U4 controllers.
The Maestro Servo Controllers can be purchased from Pololu's website. Before continuing, careful reading of the Maestro Servo Controller User's Guide is recommended.
The minimal connections required for using this library are:
Arduino TX pin (see table below) - Maestro RX
Arduino GND - Maestro GND
The example sketches try to use a hardware serial port on your Arduino if one is available. The one used is defined by SERIAL_PORT_HARDWARE_OPEN. The pins for this serial port are different depending on which Arduino you are using.
Microcontroller Board | Hardware serial? | MCU RX pin | MCU TX pin |
---|---|---|---|
A-Star 32U4 | Yes | 0 | 1 |
Arduino Leonardo | Yes | 0 | 1 |
Arduino Micro | Yes | 0 | 1 |
Arduino Mega 2560 | Yes | 19 | 18 |
Arduino Due | Yes | 19** | 18 |
Arduino Uno | No | 10 | 11 |
Arduino Yun | No | 10 | 11 |
If you would like to read information from the Maestro, like in the Input example sketch, you need to make one additional connection:
Arduino RX (see table above) - Maestro TX
** The Due's serial port is 3.3 V, so it should not be directly connected to the Maestro's 5 V TX line. A voltage divider or level shifter can be used.
Before using the example sketches, you should go to the Serial Settings tab in the Maestro Control Center and apply these settings:
- Serial mode: UART, fixed baud rate
- Baud rate: 9600
- CRC disabled
If you are using version 1.6.2 or later of the Arduino software (IDE), you can use the Library Manager to install this library:
- In the Arduino IDE, open the "Sketch" menu, select "Include Library", then "Manage Libraries...".
- Search for "PololuMaestro".
- Click the PololuMaestro entry in the list.
- Click "Install".
If this does not work, you can manually install the library:
- Download the latest release archive from GitHub and decompress it.
- Rename the folder "maestro-arduino-xxxx" to "PololuMaestro".
- Drag the "PololuMaestro" folder into the "libraries" directory inside your Arduino sketchbook directory. You can view your sketchbook location by opening the "File" menu and selecting "Preferences" in the Arduino IDE. If there is not already a "libraries" folder in that location, you should make the folder yourself.
- After installing the library, restart the Arduino IDE.
Several example sketches are available that show how to use the library. You can access them from the Arduino IDE by opening the "File" menu, selecting "Examples", and then selecting "PololuMaestro". If you cannot find these examples, the library was probably installed incorrectly and you should retry the installation instructions above.
For complete documentation of this library, including many features that were not mentioned here, see the maestro-arduino documentation.
- 1.0.0 (2015 Jan 12): Original release.