Device(s) in range / closer than to PuckJS #1937
Unanswered
espruino-discuss
asked this question in
Puck.js, Pixl.js, Jolt.js and MDBT42
Replies: 1 comment
-
Posted at 2017-01-13 by @gfwilliams All you need is Note that doing stuff like that leaves the radio on, so will drain the batteries a lot faster! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-01-13 by stephaneAG
Hi there
For anon-going project, I need to know if some device(s) are within the range of a Puck, and, if within it, how close the device(s) is/are to the Puck.
From what I could read in the ref, I see we can only "NRF.setRSSIHandler()" on the currently active connection, while we have an "rssi" prop in the "BluetoothDevice" objects returned by "NRF.findDevices()".
For a single device, I presume that using "NRF.connect()" and then setting an interval to handle the RSSI 'd do the trick, but I was wondering what was the best way to achieve the same behavior for multiple devices: in other words, some sort of "NRF.findDevices()" discarding anything that not in our interest ( ex: devices whose names & stuff are not present in an array ) ?
Anyway, I'll give both a try as soon as I can (..)
-> any hints welcome ;)
Beta Was this translation helpful? Give feedback.
All reactions