I got a TTGO T-Beam V1.0 and enhanced the paxcounter software to support some of the new board features:
- GPS PPS interrupt line
- PMU (power management unit)
- Two Buttons
As PMU an x-powers.com AXP192 chip is used. Although this is an older model dated around 2011, is has a bunch of interesting features, look at the data sheet (unfortunately chinese only, does anyone has english version?)
In paxcounter code i added some examples for the various power interrupts - works! Now you can easyly trigger on power events, like battery connected/removed, USB plug connected/removed, battery overheated/charged etc.
The second user button is also controlled by the PMU.