[2]Binary 🔋battery level

by Ricardo Fernández Serrata

Version 4 (September 15, 2021)

Download (11 downloads)

Shows a notification where the batt level is shown in the most binary way. It's Octal, on a scale from 0 to 63 inclusive (0o00 to 0o77) like some retro devices.

I tried a scale from 0 to 255, but that requires upscaling that gives a false sense of precision, so I decided to downscale 100 to 63 (127 is still larger than 100, just like 255)

I tried hexadecimal, but it doesn't have good "symmetry" when expressing 6bit values (the max value is 0x3F). The only aesthetic choices are base 2 or 8, but the most efficient is 8.

To save energy, I precomputed the array using this expression `((i / 1.5873015873015872) >> 3) ++ ((i / 1.5873015873015872) & 7)` where `i` goes from 0 to 100 inclusive