File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2121#CS = digitalio.DigitalInOut(board.RFM69_CS)
2222#RESET = digitalio.DigitalInOut(board.RFM69_RST)
2323
24+ # Define the onboard LED
25+ LED = digitalio .DigitalInOut (board .D13 )
26+ LED .direction = digitalio .Direction .OUTPUT
27+
2428# Initialize SPI bus.
2529spi = busio .SPI (board .SCK , MOSI = board .MOSI , MISO = board .MISO )
2630
5559 #packet = rfm69.receive(timeout=5.0)
5660 # If no packet was received during the timeout then None is returned.
5761 if packet is None :
62+ # Packet has not been received
63+ LED .value = False
5864 print ('Received nothing! Listening again...' )
5965 else :
6066 # Received a packet!
67+ LED .value = True
6168 # Print out the raw bytes of the packet:
6269 print ('Received (raw bytes): {0}' .format (packet ))
6370 # And decode to ASCII text and print it too. Note that you always
You can’t perform that action at this time.
0 commit comments