M5.Lcd.printf("pin 35 status: %d\r\n", digitalRead(35));
// Read IRQStatus, also clears the status bits
M5.Lcd.printf("axp192 btn status: %d\r\n", axp192_getBtnIRQStatus());
// IRQStatus has been cleared, so pin 35 is always 1
Serial.printf("pin 35 status: %d\r\n", digitalRead(35));
// Read IRQStatus again but since it's been cleared, it's always 0
Serial.printf("axp192 btn status: %d\r\n", axp192_getBtnIRQStatus());
The updates in this PR should fix this and both Serial and LCD will reflect the changing values.
In the original, I got the following the serial output, but the readings on the LCD screen was fine (they change as expected)
The updates in this PR should fix this and both Serial and LCD will reflect the changing values.