This is my take on a fun battery level program for the Mindstorms 51515 Robot Inventor
At the lowest level (under 10%) it displays the image of a plug. The remaining battery states are displayed via bars (similar to cell network on phones). Each battery state has a specific sound and Main button led color associated.
This program shows how I circumvented issues, I'm sure there is a way to rewrite this in more concise fashion, so feel free to contribute!
AKN: Was useful to the creation of this program material posted online by: Anton's Mindstorms hacks Artpoz (on GitHub) lego.github.io And the help guides in the Mindstorms App