It's odd that the Puck does take so long, but it's great that it's working.
It is possible to re-use the characteristics as well - and that can provide a big speedup.
Also worth adding that if you're using findDevices rather than requestDevice, findDeviceswill wait for exactly the timeout you specified (which could be 20 sec?). requestDevice will scan for the timeout you specify as a maximum but if it finds the device earlier it'll stop
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's odd that the Puck does take so long, but it's great that it's working.
It is possible to re-use the characteristics as well - and that can provide a big speedup.
Also worth adding that if you're using
findDevices
rather thanrequestDevice
,findDevices
will wait for exactly the timeout you specified (which could be 20 sec?).requestDevice
will scan for the timeout you specify as a maximum but if it finds the device earlier it'll stop