Serial Communication with SMS Modem (FONA)

import serial
ser = serial.Serial(port='/dev/ttyAMA0', baudrate=115200, timeout=1)
cmd="AT\r"
ser.write(cmd.encode())
msg=ser.read(64)
print(msg)
Facebooktwitterredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.