We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58df7a6 commit 2a32c3eCopy full SHA for 2a32c3e
examples/fona_sms_response.py
@@ -11,10 +11,7 @@
11
rst = digitalio.DigitalInOut(board.D5)
12
13
# Initialize FONA module (this may take a few seconds)
14
-fona = FONA(uart, rst)
15
-
16
-# Enable FONA debug output
17
-fona.debug=True
+fona = FONA(uart, rst, debug=True)
18
19
# Initialize Network
20
while fona.network_status != 1:
@@ -43,3 +40,14 @@
43
40
sender, message = fona.read_sms(sms_slot)
44
41
print("FROM: ", sender)
45
42
print("MSG: ", message)
+
+ # Reply back!
+ print("Sending response...")
46
+ if not fona.send_sms(int(sender), "Hey, I got your text!"):
47
+ print("SMS Send Failed")
48
+ print("SMS Sent!")
49
50
+ # Delete the original message
51
+ if not fona.delete_sms(sms_slot):
52
+ print("Could not delete SMS in slot", sms_slot)
53
+ print("OK!")
0 commit comments