Hey i am writing a python script to be able to controll a motor controller i am using pyserial to open a serial port and pygame for controller input. I am trying to use port.write(!G 1 500 /r/n) command and then i read from it but it is not working i dont get any action from the motors do i need to use a diffent command for it work
It looks like you have the carriage return incorrect, it should be !G 1 500\r (no space between carriage return and command string, no \n necessary).
Additionally keep in mind that by default we have a serial watchdog time enabled for 1000ms. Unless your script is looping at less than 1s, this command would execute but the motor would only move for 1s and then stop. You will either need to disable or extend the watchdog timer in the controller configuration.