Skip to content

Commit 06c9891

Browse files
brentrubrentru
authored andcommitted
add error msgs to pi radio testing examples
1 parent 40056f8 commit 06c9891

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pi_radio/rfm69_check.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@
5454
try:
5555
rfm69 = adafruit_rfm69.RFM69(spi, CS, RESET, 915.0)
5656
display.text('RFM69: Detected', 0, 0, 1)
57-
except RuntimeError:
57+
except RuntimeError as error:
5858
# Thrown on version mismatch
5959
display.text('RFM69: ERROR', 0, 0, 1)
60+
print('RFM69 Error: ', error)
6061

6162
# Check buttons
6263
if not btnA.value:

pi_radio/rfm9x_check.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@
5353
try:
5454
rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, 915.0)
5555
display.text('RFM9x: Detected', 0, 0, 1)
56-
except RuntimeError:
56+
except RuntimeError as error:
5757
# Thrown on version mismatch
5858
display.text('RFM9x: ERROR', 0, 0, 1)
59+
print('RFM9x Error: ', error)
5960

6061
# Check buttons
6162
if not btnA.value:

0 commit comments

Comments
 (0)