How to restore display after M5.Axp.SetSleep() with code?
-
There is display off after M5.Axp.SetSleep()
How to restore (or reset) display from code after that, f.e. when button is pressed? -
I am already detect that M5.Axp.begin() can help to restore the display
-
How did you manage to use M5.Axp.SetSleep()?
I have the latest library installed (0.0.5) in Arduino, includedAXP192.h
and I get the error:'class AXP192' has no member named 'SetSleep'
What am I missing?
Note: using M5StickC
-
@ricardocosta
void AXP192::SetSleep(void){Wire1.beginTransmission(0x34); Wire1.write(0x31); Wire1.endTransmission(); Wire1.requestFrom(0x34, 1); uint8_t buf = Wire1.read(); buf = (1<<3)|buf; Wire1.beginTransmission(0x34); Wire1.write(0x31); Wire1.write(buf); Wire1.endTransmission(); Wire1.beginTransmission(0x34); Wire1.write(0x12); Wire1.write(0x41); Wire1.endTransmission();
}