lora sx126x rx/tx library
Project description
sx126x
install
pip3 install sx126x
example
receiver
from sx126x.SX126X import SX126X
from time import sleep
from asyncio import run
async def main():
node = SX126X("/dev/ttyUSB0")
tx, rx, freq, data = await node.receive()
while not data:
tx, rx, freq, data = await node.receive()
sleep(1)
print(tx, rx, freq, data)
if __name__ == '__main__':
run(main())
sender
from sx126x.SX126X import SX126X
from asyncio import run
async def main():
node = SX126X("/dev/ttyUSB1", 2)
await node.send_to(1, 868, b"Hello\0")
if __name__ == '__main__':
run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sx126x-1.0.tar.gz
(3.4 kB
view hashes)