Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import serial,time
pwm=64
ser = serial.Serial('COM3', baudrate=57600, timeout=None) # open serial port
print(ser.name) # check which port was really used
while 1:
ser.write(b"S 0:72,1:72,2:72,3:72,4:72,5:72\n") # write a string
time.sleep(0.5)
ser.close() # close port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment