2019-11-20 17:24:53 +00:00
|
|
|
from lora_transceiver import LoRaTransceiver
|
2019-11-20 17:37:43 +00:00
|
|
|
|
|
|
|
# create transceiver for LoRaWAN frequency (channel 0 = 868.1 Mhz)
|
2019-11-20 17:24:53 +00:00
|
|
|
lora = LoRaTransceiver(frequency=868.1E6, syncword=0x34)
|
|
|
|
|
2019-11-20 17:37:43 +00:00
|
|
|
# change the spreading factor
|
|
|
|
lora.setSpreadingFactor(7)
|
|
|
|
|
|
|
|
# sending string data
|
|
|
|
lora.send_string('imaginaerraum')
|
|
|
|
|
|
|
|
# sending raw data
|
|
|
|
lora.send([0x61, 0x62, 0x63])
|
|
|
|
|
|
|
|
# receiving data
|
|
|
|
lora.recv()
|