Mini Maestro and python


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.


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

- Amanda

Thanks a lot AmandaS. Now it works :smiley: