'another option on the approach with the mpr121 that avoids polling'
I like that post #11 suggestion @SimonGAndrews and although I haven't measured, I believe that technique also extends battery life, as Javascript isn't continuously executing as a result of the setInterval duration.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Wed 2021.09.22
I like that post #11 suggestion @SimonGAndrews and although I haven't measured, I believe that technique also extends battery life, as Javascript isn't continuously executing as a result of the setInterval duration.