Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

M5 Core2 Cannot control LCD brightness #180

Open
teastainGit opened this issue Apr 11, 2021 · 1 comment
Open

M5 Core2 Cannot control LCD brightness #180

teastainGit opened this issue Apr 11, 2021 · 1 comment

Comments

@teastainGit
Copy link

M5 Core2 Cannot control LCD brightness with APX192.cpp or in sketch set up. Tried editing APX192.cpp with SetLcdVoltage(2900); to get 2.9 volts and tried these ideas that work on StickC and core basic:
M5.Axp.SetLcdVoltage(3000);
M5.Lcd.setBrightness(255);
M5.Axp.ScreenBreath(15);
The serial monitor boot up display always says "axp: lcd backlight voltage was set to 2.80v" regardless!
Any Ideas?
Terry from Canada

@Minxster
Copy link

I'm really new to programming, so I might not be too helpful at all. This is function I wrote to try and get around the issues I faced with changing the brightness. Hopefully it can help you :-)

`//Core2 doesn't seem to use the exsint M5.Lcd.SetBrightness!?
void SetLCDBrightness (unsigned int BrightVal) {
//Why is this not working, is there are reset of some sort after this!?
//M5.Lcd.setBrightness(25);

// https://community.m5stack.com/topic/2676/m5-lcd-setbrightness-not-working/2

//Check value is 0>100
if (BrightVal>100) {BrightVal=100;}
if (BrightVal<0) {BrightVal=0;}

// vPerc=100; //50% -> need to calc this though
BrightVal=(BrightVal*8)+2500; //calc the value
M5.Axp.SetLcdVoltage(BrightVal); // v from 2500 to 3300
}`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants