I've noticed more than one method for finding BLE devices. Is one more standard or preferred over another?
If you mean scanning then:
NRF.findDevices scans for a certain amount of time and merges all the advertising data received into an array of devices - if you just want a list of devices it's the way to go.
NRF.setScan calls a function every time an advertisement is received - it's real-time, but finding duplicates and merging data from different packets is up to you
NRF.requestDevice does NRF.findDevices under the hood but picks just one device based on the criteria you define
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.
If you mean scanning then:
NRF.findDevices
scans for a certain amount of time and merges all the advertising data received into an array of devices - if you just want a list of devices it's the way to go.NRF.setScan
calls a function every time an advertisement is received - it's real-time, but finding duplicates and merging data from different packets is up to youNRF.requestDevice
doesNRF.findDevices
under the hood but picks just one device based on the criteria you define