30 lines
563 B
Python
30 lines
563 B
Python
from sx1262 import SX1262
|
|
from _sx126x import *
|
|
import time
|
|
import crypt_random
|
|
|
|
from lora_handler import LoRaHandler
|
|
|
|
LORA_ENABLED = True
|
|
BLUETOOTH_ENABLED = False
|
|
|
|
|
|
def main():
|
|
bluetooth_handler = None
|
|
if BLUETOOTH_ENABLED:
|
|
from bluetooth_handler import BluetoothHandler
|
|
bluetooth_handler = BluetoothHandler()
|
|
|
|
lora_handler = None
|
|
if LORA_ENABLED:
|
|
lora_handler = LoRaHandler()
|
|
|
|
print("Ready!")
|
|
while True:
|
|
lora_handler.advertise()
|
|
time.sleep(5)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|