Skip to content

Instantly share code, notes, and snippets.

@yzdann
Created January 25, 2019 08:47
Show Gist options
  • Save yzdann/84b4a130cb32393090cefabe33cd52f8 to your computer and use it in GitHub Desktop.
Save yzdann/84b4a130cb32393090cefabe33cd52f8 to your computer and use it in GitHub Desktop.
import serial
import time
# set dev path
dev_path = ''
baudrate = 9600
ser = serial.Serial(dev_path, baudrate, timeout=0)
ser.flushInput()
ser.flushOutput()
while True:
ser.write('things to write')
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment