Extended Core2 LCD brightness - function demo.
SarahC last edited by
You might have noticed that setBrightness() doesn't do anything on the Core2, and ScreenBreath() seems dodgy. (See this: https://github.com/m5stack/M5Core2/issues/20 )
So while the complexities of the AXP192 registers are ironed out, I've created a function called core2Brightness(). It's not in a library, you just copy and paste it into your Arduino .ino sketch file.
core2Brightness() physically turns your backlight off at level 0, and increases the dimmable range of the backlight all the way down to "barely visible in absolute darkness".
It uses the absolute minimum discrete brightness levels enabled by the AXP192 library, so every value from 0 through 20 produces an observable change in brightness, unlike other available functions. =)
If you're a rebel, it can also increase the brightness range using the "turbo mode", but the official M5Stack view is not to do it, or for very short periods only else overheating and LED damage can occur. It's obvious damage, it'll void your warranty. You can't send it back if you overdrive it and it pops.