Skip to content

Instantly share code, notes, and snippets.

@gOmp
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gOmp/ca6a2a734ab5a3b521fe to your computer and use it in GitHub Desktop.
Save gOmp/ca6a2a734ab5a3b521fe to your computer and use it in GitHub Desktop.
import serial
ser = serial.Serial("/dev/ttyAMA0", baudrate=19200, timeout=2.0)
ser.write('AT\r')
print ("AT Command was Sent.\n waiting for OK\n")
print ser.read(100) #if everything went as expected it should return OK
ser.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment