Mini Maestro 18 works with Command Center but not python code

I have written some python code to use a maestro servo controller to send digital output signals. The controller works fine using the command center, but when I replicate those commands with my code there is no response. Im fairly sure that my code is not at fault because I have run the code on another maestro controller Im using for another project without issue. I have made sure that I have the serial mode on the controller set to USB dual port, but that didnt fix the problem. Also just tried upgrading the firmware but the issue still persists.

Hello.

I am sorry to hear you are having problems with your Maestro servo controller. Could you post more specific information about your setup and what you’re doing? In particular, the following information would be most useful:

  1. a copy of your Maestro settings file (you can save a copy of your Maestro settings file from the “FIle” drop-down menu of the Maestro Control Center while the controller is connected.
  2. a simplified, but complete version of your Python code that demonstrates the problem.
  3. pictures of your setup that show all of your connections.
  4. How are you reading/monitoring the Maestro outputs?

Also, is the Maestro’s red LED on (indicating an error) when you run your program? If so, could you try connecting it to the Maestro Control Center and seeing what error is being displayed in the “Errors” tab?

Brandon

Hi Brandon,

Here is my settings file
maestro_settings.txt (3.5 KB) and a copy of my code polulu test.py (1.1 KB). I have the maestro outputs connected to relays that switch some solenoids on/off. The board/system works perfectly when I use the frame looping inside the control center. The red LED is not on when I run my code, and I dont see any errors in the control center.

Thank you for the additional information.

It looks like your code specifies Maestro channels 20, 21, and 22 (i.e. 0x014, 0x015, 0x016 in hex), but your settings file is for an 18-channel Maestro. So, I suspect you’re trying to use channels 14, 15, and 16. You should be able to use the decimal representation to make it easier to read, but if you want to use hex, it would be 0x0E (14), 0x0F (15), and 0x10 (16).

If you fix that and it still does not work, you might also double check that you are connecting to the Maestro’s “Command port” (and not the “TTL port”).

Brandon

Hi Brandon

You were totally right, my hex values were wrong. This forum is a big part of why I have kept ordering parts from you guys.

Thanks for the help

1 Like