Created
June 27, 2014 05:56
-
-
Save j-mcc1993/538ee3a62bcb61fc5f45 to your computer and use it in GitHub Desktop.
Testing out pySerial library to communicate serially with Arduino over USB.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial, time | |
ser = serial.Serial('/dev/cu.usbmodem411', 9600) | |
while True: | |
bin = bytes(chr(5), encoding = 'ascii') | |
print(bin) | |
ser.write(bin) | |
time.sleep(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment