At the moment, removing the requirement for the led module in main.py breaks the network loader. Given situations where you haven't got a neopixel on board to display the status then this causes a break if you remove it. It's also not configurable to use other types of visual display such as a normal LED or an OLED display.
Suggest the following changes:
have a global network state variable that can be updated by the aiko.net module as it polls, connects etc.
Move the current functionality that controls the LED behaviour into a loader_display module that can be instantiated as an application using configuration/main.py
This can then create a timer which polls the current state of the network global and reflects that to the appropriate display type.
This can be extended to have different sub modules for normal LED, neopixel and oled each of which can be created and then passed into the loader_display module on startup.
At the moment, removing the requirement for the
led
module inmain.py
breaks the network loader. Given situations where you haven't got a neopixel on board to display the status then this causes a break if you remove it. It's also not configurable to use other types of visual display such as a normal LED or an OLED display.Suggest the following changes:
aiko.net
module as it polls, connects etc.loader_display
module that can be instantiated as an application usingconfiguration/main.py
normal LED
,neopixel
andoled
each of which can be created and then passed into theloader_display
module on startup.