Mini Maestro and python

Hello,

I tryed to control the Mini Maestro by a python script that runs on a PC. The code is:

import serial serial.Serial("COM5").write("\x84\0x00\0x70\0x2E") serial.Serial("COM5").write("\x84\0x02\0x70\0x2E")

This works only for the servo at channel 0. The second servo at channel 2 never moves but instead the first does. Even if I send the command to a channel without a servo the first one moves.

Hello.

Your serial command is incorrect. ‘0x’ is used for literal numbers. You need to send the string literal for HEX, “\x”. Try sending:

import serial
serial.Serial("COM5").write("\x84\x00\x70\x2E")
serial.Serial("COM5").write("\x84\x02\x70\x2E")

- Amanda

Thanks a lot AmandaS. Now it works :smiley: