LoRa-Training/main_+lcd.py

36 lines
860 B
Python

from ProgramChooser import ProgramChooser
import sys
import gc
def lora_receiver_run():
from lora_simple import lora_receiver
lora_receiver.run()
gc.collect()
def lora_sender_run():
from lora_simple import lora_sender
lora_sender.run()
gc.collect()
def lora_pingpong_init():
import lora_pingpong
lora_pingpong.run_lcd_init()
gc.collect()
def lora_pingpong_resp():
import lora_pingpong
lora_pingpong.run_lcd_resp()
gc.collect()
def led_test_run():
import led_test
led_test.run() # run the led blink test (blink twice)
gc.collect()
programs = {
"simplereceiver": lora_receiver_run,
"simplesender": lora_sender_run,
"pingpong_init": lora_pingpong_init,
"pingpong_resp": lora_pingpong_resp,
"led_test": led_test_run,
}
pc = ProgramChooser(programs, 7, 8, debug=True)
pc.run()