Thanks Gordon, that works. The only problem I still get with scanning is that the Puck that does it will get unresponsive after a while, not totally, I still can connect to it, but if I write commands in the console of the ide, they are laggish, and most of the time uploading code with get stuck somewhere in the middle, I have to take out the battery. Doing
reset()
NRF.setScan()
on the console doesn't fix the problem. Any idea what's wrong? Would setInterval with NRF.findDevices be a better approach to periodically scanning and get data (number) from another Puck?
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.
Thanks Gordon, that works. The only problem I still get with scanning is that the Puck that does it will get unresponsive after a while, not totally, I still can connect to it, but if I write commands in the console of the ide, they are laggish, and most of the time uploading code with get stuck somewhere in the middle, I have to take out the battery. Doing
on the console doesn't fix the problem. Any idea what's wrong? Would setInterval with NRF.findDevices be a better approach to periodically scanning and get data (number) from another Puck?