M5-TOUGH / unable to change display brightness
-
Hi.
I'm using the latest library via Platformio (lib_deps = https://github.com/m5stack/M5Tough) and am unable to change the display brightness.
My code is as simple as this:
M5.Axp.SetLcdVoltage(2500);This does not change anything on the display.
It works with the M5-Core2 module though.
Can anybody confirm the
SetLcdVoltageworks for the M5-TOUGH?Thanks and have a great week.
-
no M5-Core to try
https://github.com/m5stack/M5Tough/blob/master/src/M5Display.hclass M5Display : public TFT_eSPI { public: static M5Display* instance; M5Display(); void begin(); void sleep(); void wakeup(); void setBrightness(uint8_t brightness); void clearDisplay(uint32_t color=ILI9341_BLACK) { fillScreen(color); } void clear(uint32_t color=ILI9341_BLACK) { fillScreen(color); } void display() {}so you can try this
#include <M5Display.h> M5.Lcd.setBrightness(value); //uint8_t Brightness (0: Off - 255:Full) -
Hi.
No Luck with
M5.Axp.SetLcdVoltage(...);
The value has to be from 0-255 anyway.At the backside they mentioned the backlight:
"BL: ACP_LDO3"So this seems to the same as in Core2.
-
@erazor I have an "always on" project using Core Basic. I use
M5.Lcd.setBrightness(75); //75 is high
and
M5.Lcd.setBrightness(10); //10 is low
Works well, you can try different values to suit.
-Terry
P.S.
My other application runs on a Core2 and I use:
if (enable) {
M5.Axp.SetLcdVoltage(2900); //3000 very bright
} else {
M5.Axp.SetLcdVoltage(2600); //2500 way too dark, 2600 very dim
} -
Well, yeah... but nothing works with the M5-TOUGH which should support it via the Axp.
-
Hello @erazor
have a look at the AXP192.cpp where
SetLDOVoltage()is used to manipulate LDO3 (aka brightness). Use it like below in your code.M5.Axp.SetLDOVoltage(3,3000);Thanks
Felix -
@felmue said in M5-TOUGH / unable to change display brightness:
M5.Axp.SetLDOVoltage(3,3000);
Hi Felmue!
That one works, thanks a lot!
Really confusing that there is a PWM backlight LED mentioned in the library which does not work. And that the usage of SetLcdVoltage is inconsistent between the Core2 and TOUGH.
On Core2 the LcdVoltage changes DCDC3 (
@param number 0=DCDC1 / 1=DCDC2 / 2=DCDC3) which is connected to LCD_BL. For the TOUGH on the other hand DCDC3 is unused and they used the LDO3.So maybe they should simply change the line
SetDCVoltage(2, voltage);toM5.Axp.SetLDOVoltage(3,voltage);or maybe even better introduce a new functionSetLCDBacklightVoltage(...)in their library.Thanks to all for your hints.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login