Thank you for your answer.
My card is an Arduino Mega and i use pins 18 (Tx) and 19 (Rx) to connect to Maestro.
The set-up of the Maestro card is as described in the example program (i did not change it as it was already like that by default)
- Serial mode: UART, fixed baud rate
- Baud rate: 9600
- CRC disabled
I suspect a problem with receiving data at Arduino side…
Here is my code (i just re-used the example program and made some changes; blocking instructions
are commented out)
/* This example shows how to control a single servo on a Maestro
servo controller using the PololuMaestro library. It assumes you
have an RC hobby servo connected on channel 0 of your Maestro,
and that you have already used the Maestro Control Center
software to verify that the servo is powered correctly and moves
when you command it to from the Maestro Control Center.
Before using this example, 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
Be sure to click "Apply Settings" after making any changes.
This example also assumes you have connected your Arduino to your
Maestro appropriately. If you have not done so, please see
https://github.com/pololu/maestro-arduino for more details on how
to make the connection between your Arduino and your Maestro. */
/* On#include <SoftwareSerial.h> boards with a hardware serial port available for use, use
that port to communicate with the Maestro. For other boards,
create a SoftwareSerial object using pin 10 to receive (RX) and
pin 11 to transmit (TX). */
#define maestroSerial SERIAL_PORT_HARDWARE_OPEN
SoftwareSerial maestroSerial(19, 18);
/* Next, create a Maestro object using the serial port.
Uncomment one of MicroMaestro or MiniMaestro below depending
on which one you have. */
int serPosition = 0;
// Set the serial baud rate.
/* setTarget takes the channel number you want to control, and
the target position in units of 1/4 microseconds. A typical
RC hobby servo responds to pulses between 1 ms (4000) and 2
ms (8000). */
// Set the target of channel 0 to 1500 us, and wait 2 seconds.
Serial.println("Set to 6000");
// movingState = maestro.getMovingState();
// serPosition = maestro.getPosition(0);
// Serial.print("Position: ");
Serial.println("Set to 2200");