Hi fellow MySensorists,
I have put together an LED dimming prototype board using the instructions on the relevant Build page and the NodeManager documentation.
Everything seems to be working but I have trouble implementing one crucial feature which is important for my application.
My dimming application is a retrofit for a ceiling LED fixture which has no built-in dimming capability. My plan is to simply add my Mysensors based dimming board between the fixture's built-in 12V power-supply and the LED strips installed in the fixture. Thus, my Arduino would get the power from the fixture's power supply, same as the LED strips.
In this setup, my Arduino powers up every time when the light gets switched on and powers down when the light gets switched off.
I would like to switch the LEDs ON as soon as possible when the user flips the light-switch ON to have a good user experience. A long delay between flipping the switch and getting light is annoying (I also have some LED fixtures with slow PSUs and I hate them).
Currently, I try to restore the brightness in the before() method but this still results in a 2s delay between getting power and the LEDs start emitting in the fixture. This is probably because long bootup time of the Arduino and the initialization of the radio.
How could I get this delay down? (Ideally below 300-500ms)
Is there a method which runs immediately after the Arduino powerup (before any kind of MySensors activity around the radio)?
If the Arduino boot sequence is the main culprit for the slowness, how can I make it faster?
Any insight is appreciated,