Files
mesh-network-project/relay/main.py

25 lines
506 B
Python
Raw Normal View History

from sx1262 import SX1262
from _sx126x import *
2026-05-15 12:09:41 +10:00
from connection import Connection
import time
import crypt_random
2026-05-15 12:09:41 +10:00
import uasyncio as asyncio
2026-03-07 08:43:54 +11:00
def main():
bluetooth_handler = None
2026-05-15 17:14:33 +10:00
try:
from bluetooth_handler import BluetoothHandler
bluetooth_handler = BluetoothHandler()
2026-05-15 17:14:33 +10:00
except ImportError:
print("Bluetooth is disabled. Continuing without it...")
2026-03-07 08:40:56 +11:00
2026-05-15 17:14:33 +10:00
conn = Connection(bluetooth_handler)
2026-05-15 12:09:41 +10:00
asyncio.run(conn.start())
if __name__ == "__main__":
main()