Problem with serial communication through USB
Posted: Sat Apr 25, 2020 10:46 am
I'm trying to send commands from raspberry pi 3b+ to 32 CH servo control board with serial communication through USB.
After first command (3P1100T500D0) is executed nothing happens and i have to unplug and plug in again board to even use first command in the code.
Code: Select all
import serial
import time
ser = serial.Serial('/dev/ttyACM0', baudrate=115200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS
)
while True:
ser.write(b"#3P1100T500D0\n")
print("1100")
time.sleep(0.5)
ser.write(b"#3P1800T500D0\n")
print("1800")
time.sleep(0.5)
