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 c06bf86 commit d6220d9Copy full SHA for d6220d9
FONA_SMS_Sensor/code.py
@@ -9,10 +9,10 @@
9
10
# Create a serial connection for the FONA connection
11
uart = busio.UART(board.TX, board.RX)
12
-rst = digitalio.DigitalInOut(board.D5)
+rst = digitalio.DigitalInOut(board.D4)
13
14
# Initialize FONA module (this may take a few seconds)
15
-fona = FONA(uart, rst, debug=True)
+fona = FONA(uart, rst)
16
17
# Initialize BME280 Sensor
18
i2c = busio.I2C(board.SCL, board.SDA)
@@ -37,6 +37,8 @@
37
notification_buf = fona.read_line()[1]
38
# Split out the sms notification slot num.
39
notification_buf = notification_buf.decode()
40
+ if "+CMTI:" not in notification_buf:
41
+ continue
42
sms_slot = notification_buf.split(",")[1]
43
44
print("NEW SMS!\n\t Slot: ", sms_slot)
0 commit comments