I’ve set up my Inkplate 10 with ESPHome and want to implement two features:
Detect when the physical Wake button is pressed so I can trigger screen updates or switch between dashboards. When I press the button nothing happens. Is there a GPIO connected to this button that I can use as a button sensor in ESPHome?
Detect whether the battery is being charged. Is there a GPIO connected to the battery charger that I can read to determine charging status?
I haven’t found GPIO information for Inkplate 10 v2 on the website yet.
Originally submitted via the contact form on soldered.com on 21 October 2023. Migrated to the forum for community visibility.
The WAKE button is connected to GPIO_36 and has a hardware pull-up. Configure it as an INPUT - the button is pressed when the input is LOW. See the schematic for details.
For battery charging detection: The battery charges whenever Inkplate is plugged in via USB and discharges when unplugged. You can read the battery voltage using the readBattery function from the library:
For implementation details, see:
The V_BAT pin is GPIO 35. You’ll need to copy all the functionality to get a full correct reading.
I’ve implemented the Wake button control based on the GPIO_36 information. For battery detection, I’ve already created a working sensor that reads battery voltage on GPIO 35:
The sensor reads values between 3.6V and 4.2V, but it can’t tell me whether the USB charger is connected or if the battery is charging. I need to implement different logic when USB is plugged in (for example, disable deep sleep mode) versus when running on battery only. Is there a way to detect via software whether the USB cable is plugged in or the battery is charging? I didn’t find such a function in the links provided.
There is no dedicated GPIO pin for this, but you can use the red charge LED indicator. Connect the MCP73831 STAT pin (Pin 1 of the charger) to a GPIO and read it - when it goes HIGH, Inkplate is charging. You can also get the input of the red charge LED and connect it to a GPIO to read its state.