added rfm init error msg

This commit is contained in:
Paul 2024-01-29 11:55:11 +01:00
parent 5e2965d274
commit 818c4e1ad3
1 changed files with 6 additions and 1 deletions

View File

@ -9,8 +9,13 @@ import adafruit_rfm9x
CS = DigitalInOut(board.CE1)
RESET = DigitalInOut(board.D25)
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
try:
rfm = adafruit_rfm69.RFM69(spi, CS, RESET, 868.0)
except RuntimeError as error:
print('RFM69 Error: ', error)
#rfm = adafruit_rfm69.RFM69(spi, CS, RESET, 868.0)
rfm = adafruit_rfm9x.RFM9x(spi, CS, RESET, 868.0, baudrate=20000000)
#rfm = adafruit_rfm9x.RFM9x(spi, CS, RESET, 868.0, baudrate=20000000)
addr = '/tmp/rfmtty'
addr_client = '/tmp/rfmtty_client'