diff --git a/components/axp192/axp192.cpp b/components/axp192/axp192.cpp index 39ad722..bdd2d11 100644 --- a/components/axp192/axp192.cpp +++ b/components/axp192/axp192.cpp @@ -207,7 +207,7 @@ void AXP192Component::UpdateBrightness() case AXP192_M5CORE2: { uint8_t buf = Read8bit( 0x27 ); - Write1Byte( 0x27 , ((buf & 0x0f) | (ubri << 4)) ); + Write1Byte( 0x27 , ((buf & 0x80) | (ubri << 3)) ); } } } diff --git a/sample-config/m5core2.yaml b/sample-config/m5core2.yaml index 67f0694..8a3c9f8 100644 --- a/sample-config/m5core2.yaml +++ b/sample-config/m5core2.yaml @@ -39,6 +39,7 @@ sensor: address: 0x34 i2c_id: bus_a update_interval: 30s + brightness: 75% battery_level: name: "${upper_devicename} Battery Level" id: "${devicename}_batterylevel" @@ -72,4 +73,4 @@ display: cs_pin: 5 dc_pin: 15 lambda: |- - it.line(20, 20, 200, 200); \ No newline at end of file + it.line(20, 20, 200, 200);