added basic cryptography, advertising, and forwarding functionality to the LoRa handler. Also added a UUID class for generating unique IDs for each device.
also, i have 2 radios now! :D
This commit is contained in:
@@ -1,23 +1,28 @@
|
||||
from sx1262 import SX1262
|
||||
from _sx126x import *
|
||||
import time
|
||||
import crypt_random
|
||||
|
||||
from bluetooth_handler import BluetoothHandler
|
||||
from lora_handler import LoRaHandler
|
||||
|
||||
LORA_ENABLED = False
|
||||
LORA_ENABLED = True
|
||||
BLUETOOTH_ENABLED = False
|
||||
|
||||
|
||||
def main():
|
||||
bluetooth_handler = BluetoothHandler()
|
||||
bluetooth_handler = None
|
||||
if BLUETOOTH_ENABLED:
|
||||
from bluetooth_handler import BluetoothHandler
|
||||
bluetooth_handler = BluetoothHandler()
|
||||
|
||||
lora_handler = None
|
||||
if LORA_ENABLED:
|
||||
lora_handler = LoRaHandler()
|
||||
|
||||
print("Halting Pico...")
|
||||
print("Ready!")
|
||||
while True:
|
||||
pass
|
||||
lora_handler.advertise()
|
||||
time.sleep(5)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user