mirror of
https://github.com/m5stack/M5Stack_MicroPython.git
synced 2026-05-20 10:14:44 -07:00
13 lines
387 B
Python
13 lines
387 B
Python
def receive(lora):
|
|
print("LoRa Receiver")
|
|
|
|
while True:
|
|
if lora.receivedPacket():
|
|
lora.blink_led()
|
|
payload = lora.read_payload()
|
|
|
|
try:
|
|
print("*** Received message ***\n{}".format(payload.decode()))
|
|
except Exception as e:
|
|
print(e)
|
|
print("with RSSI: {}\n".format(lora.packetRssi())) |