Right now, you can:
Get the RSSI of the device that is connecting to Puck.js (so the central connecting to the puck.js peripheral) - as follows:
// Start scanning NRF.setRSSIHandler(function(rssi) { console.log(rssi); }); // prints -85 (or similar) // Stop Scanning NRF.setRSSIHandler();
And you can use NRF.findDevices to get a list of advertising devices and their RSSIs
NRF.findDevices
I'm afraid there isn't a way to get the RSSI of the other device if the Puck is central - you'd have to disconnect and use NRF.findDevices
edit: I'll try and fix those docs too
@Gordon started
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.
Right now, you can:
Get the RSSI of the device that is connecting to Puck.js (so the central connecting to the puck.js peripheral) - as follows:
And you can use
NRF.findDevices
to get a list of advertising devices and their RSSIsI'm afraid there isn't a way to get the RSSI of the other device if the Puck is central - you'd have to disconnect and use
NRF.findDevices
edit: I'll try and fix those docs too