How far away is your Puck.js device? It could be the signal strength is low enough that you're right on the edge of what can be reliably received.
You can fix that to some extent by using NRF.setTxPower(4), and you could also increase the advertising rate so more advertisements get sent per second.
Also, in other posts I've suggested advertising a value that is the number of button presses - so even if you miss an advertising packet you still know the button has been pressed at some point.
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.
How far away is your Puck.js device? It could be the signal strength is low enough that you're right on the edge of what can be reliably received.
You can fix that to some extent by using
NRF.setTxPower(4)
, and you could also increase the advertising rate so more advertisements get sent per second.Also, in other posts I've suggested advertising a value that is the number of button presses - so even if you miss an advertising packet you still know the button has been pressed at some point.