Flash LED cycling RGB colors when charging phone?
Posted: 17 Dec 2018 15:49
Hello, I'm trying to do a fun flow where the flash LED will cycle through the RGB colors (or at least these, in order: red, purple, blue, light blue, green, yellow) when charging the phone. The trigger is when power is connected. For action, I tried creating notification on statusbar (flash LED: red 200ms on, 200ms off), follow by a sleep 200ms action, then another notification on statusbar (flash LED: purple 200ms on, 200ms off), sleep 200ms, etc for the remaining colors. But when I tested it, everything ran so fast and ONLY the last color is flashing (ie. the last notification with LED yellow).
How can I make the LED flashes the different colors in succession and then repeat itself, until I disconnect the phone from the power source?
How can I make the LED flashes the different colors in succession and then repeat itself, until I disconnect the phone from the power source?