Added two main.py files, either for setups with, or without LCD screen added!
This commit is contained in:
parent
57ce838cf6
commit
9112d8980b
45
main_+lcd.py
Normal file
45
main_+lcd.py
Normal file
@ -0,0 +1,45 @@
|
||||
from ProgramChooser import ProgramChooser
|
||||
import sys
|
||||
import gc
|
||||
|
||||
def micronec_run():
|
||||
from micronEC import micronec
|
||||
micronec.run()
|
||||
gc.collect()
|
||||
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_run():
|
||||
import lora_pingpong
|
||||
lora_pingpong.run()
|
||||
gc.collect()
|
||||
def lcd_big_hello_run():
|
||||
from lcd_examples import lcd_big_hello
|
||||
lcd_big_hello.run()
|
||||
gc.collect()
|
||||
def lcd_libtest_run():
|
||||
from lcd_examples import lcd_libtest
|
||||
lcd_libtest.run()
|
||||
gc.collect()
|
||||
def led_test_run():
|
||||
from excercise import led_test
|
||||
led_test.run()
|
||||
gc.collect()
|
||||
|
||||
programs = {
|
||||
"micronEC": micronec_run,
|
||||
"lorareceiver": lora_receiver_run,
|
||||
"lorasender": lora_sender_run,
|
||||
"lora_pingpong": lora_pingpong_run,
|
||||
"lcd_big_hello": lcd_big_hello_run,
|
||||
"lcd_libtest": lcd_libtest_run,
|
||||
"led_blink": led_test_run,
|
||||
}
|
||||
|
||||
pc = ProgramChooser(programs, 7, 8, debug=True)
|
||||
pc.run()
|
11
main_-lcd.py
Normal file
11
main_-lcd.py
Normal file
@ -0,0 +1,11 @@
|
||||
from simplelora import sender, receiver
|
||||
import lora_pingpong
|
||||
|
||||
to_run = 0 # 0: ping-pong | 1: sender | 2: receiver
|
||||
|
||||
if to_run == 0:
|
||||
lora_pingpong.run()
|
||||
elif to_run == 1:
|
||||
sender.run()
|
||||
elif to_run == 2:
|
||||
receiver.run()
|
Loading…
Reference in New Issue
Block a user