From f769ccdfdce05ca4cfae3acf9b7268d73fa14bf3 Mon Sep 17 00:00:00 2001 From: spirkelmann Date: Mon, 2 Dec 2019 19:00:23 +0100 Subject: [PATCH] added receive example --- micropython/examples/lora_recv.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 micropython/examples/lora_recv.py diff --git a/micropython/examples/lora_recv.py b/micropython/examples/lora_recv.py new file mode 100644 index 0000000..0ee5851 --- /dev/null +++ b/micropython/examples/lora_recv.py @@ -0,0 +1,20 @@ +from lora_transceiver import LoRaTransceiver + +from uPySensors.ssd1306_i2c import Display + +d = Display() + +# create transceiver for LoRaWAN frequency (channel 0 = 868.1 Mhz) +lora = LoRaTransceiver(frequency=868.1E6, syncword=0x34, display=d) + +# change the spreading factor +lora.setSpreadingFactor(7) + +# sending string data +#lora.send_string('imaginaerraum') + +# sending raw data +#lora.send([0x61, 0x62, 0x63]) + +# start receiving data +lora.recv()