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() programs = { "simplereceiver": lora_receiver_run, "simplesender": lora_sender_run, "pingpong_init": lora_pingpong_init, "pingpong_resp": lora_pingpong_resp, } pc = ProgramChooser(programs, 7, 8, debug=True) pc.run()