2026-03-04 16:31:57 +11:00
|
|
|
from sx1262 import SX1262
|
|
|
|
|
from _sx126x import *
|
2026-05-15 12:09:41 +10:00
|
|
|
|
|
|
|
|
from connection import Connection
|
|
|
|
|
|
2026-03-04 16:31:57 +11:00
|
|
|
import time
|
2026-05-15 10:24:49 +10:00
|
|
|
import crypt_random
|
2026-05-15 12:09:41 +10:00
|
|
|
import uasyncio as asyncio
|
2026-03-04 16:31:57 +11:00
|
|
|
|
|
|
|
|
|
2026-03-07 08:43:54 +11:00
|
|
|
def main():
|
2026-05-15 10:24:49 +10:00
|
|
|
bluetooth_handler = None
|
2026-05-15 17:14:33 +10:00
|
|
|
try:
|
2026-05-15 10:24:49 +10:00
|
|
|
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())
|
2026-03-04 16:31:57 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
main()
|