added rfm init error msg
This commit is contained in:
parent
5e2965d274
commit
818c4e1ad3
7
main.py
7
main.py
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue