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 21
21
#CS = digitalio.DigitalInOut(board.RFM69_CS)
22
22
#RESET = digitalio.DigitalInOut(board.RFM69_RST)
23
23
24
+ # Define the onboard LED
25
+ LED = digitalio .DigitalInOut (board .D13 )
26
+ LED .direction = digitalio .Direction .OUTPUT
27
+
24
28
# Initialize SPI bus.
25
29
spi = busio .SPI (board .SCK , MOSI = board .MOSI , MISO = board .MISO )
26
30
55
59
#packet = rfm69.receive(timeout=5.0)
56
60
# If no packet was received during the timeout then None is returned.
57
61
if packet is None :
62
+ # Packet has not been received
63
+ LED .value = False
58
64
print ('Received nothing! Listening again...' )
59
65
else :
60
66
# Received a packet!
67
+ LED .value = True
61
68
# Print out the raw bytes of the packet:
62
69
print ('Received (raw bytes): {0}' .format (packet ))
63
70
# 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