It's odd that I didn't experience any issues until recently though.
It might have been some recent changes in 'cutting edge' Espruino firmware. Espruino used to always get polled every 20ms when connected, which uses up a bunch of power. Now it polls every 7.5ms which makes everything way faster, but after a minute or so of inactivity it drops down to every 200ms until stuff happens again.
It means your Puck will now last a year on its battery even when it's connected, but if you just press the button after > 1 minute of inactivity then the sending of the button press and release will take 400ms. It's way more likely that you can press the button twice within that 400ms period :)
You can turn it back to default behavior with NRF.setConnectionInterval(20) if you need to.
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.
It might have been some recent changes in 'cutting edge' Espruino firmware. Espruino used to always get polled every 20ms when connected, which uses up a bunch of power. Now it polls every 7.5ms which makes everything way faster, but after a minute or so of inactivity it drops down to every 200ms until stuff happens again.
It means your Puck will now last a year on its battery even when it's connected, but if you just press the button after > 1 minute of inactivity then the sending of the button press and release will take 400ms. It's way more likely that you can press the button twice within that 400ms period :)
You can turn it back to default behavior with
NRF.setConnectionInterval(20)
if you need to.