-
Notifications
You must be signed in to change notification settings - Fork 19
Receive Operation
Chandra Wijaya Sentosa edited this page Jan 12, 2022
·
2 revisions
Receive operation begin with calling request()
method following by read()
method to read received package. available()
method can be used to get length of remaining package. For example, to receive message and a counter in last byte you can use following code.
LoRa.request()
LoRa.wait()
# get message and counter in last byte
message = ""
while LoRa.available() > 1 :
message += chr(LoRa.read()) # read multiple bytes
counter = LoRa.read() # read single byte