Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- import serial
- ser = serial.Serial(
- port='/dev/ttyACM0',
- baudrate=9600,
- parity=serial.PARITY_NONE,
- bytesize=serial.EIGHTBITS,
- timeout=1
- )
- time.sleep(1)
- while 1:
- uin = raw_input('Enter an AT command: ')
- ser.write(uin)
- x=ser.readline()
- print x
Add Comment
Please, Sign In to add comment