Created
July 28, 2017 20:07
-
-
Save headHUB/017d58be988b9b6fc6609f200f2f03f7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
ser = serial.Serial(‘/dev/ttyAMA0’, 9600, timeout=1) | |
ser.open() | |
ser.write(“testing”) | |
try: | |
while 1: | |
response = ser.readline() | |
print response | |
except KeyboardInterrupt: | |
ser.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment