Skip to content

Instantly share code, notes, and snippets.

@MrYsLab
Last active September 3, 2015 19:33
Show Gist options
  • Save MrYsLab/6efd2fabeffa59d7cc91 to your computer and use it in GitHub Desktop.
Save MrYsLab/6efd2fabeffa59d7cc91 to your computer and use it in GitHub Desktop.
serial_test
import serial
port = input('Please Enter Your Serial Port In Quotes:')
print("Attempting to open " + port + " at 57600")
my_serial = serial.Serial(port, 57600, timeout=1, writeTimeout=0)
if my_serial.isOpen():
print('Serial Port ' + my_serial.name + ' is open')
else:
print('Could not open serial port')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment