May-23-2018, 05:45 PM
So I have a USB to serial converter on /dev/ttyUSB0 and try writing to it but nothing happens:
#!/usr/bin/python import serial import sys # Set Port ser = serial.Serial('/dev/ttyUSB0', 57600, 8, 'N', 1, timeout=1) ser.open() # Reopen the port. reset = "Hello World" ser.write(reset) time.sleep(.5) print 'serial closed' ser.close()What am I doing wrong?