You can use NRF.connect/disconnect events to figure out when a central is connected to you or not: http://www.espruino.com/Reference#l_NRF_connect
I'd have thought that would do you, but you can also use the oddly named NRF.getSecurityStatus().connected to 'poll' as well: http://www.espruino.com/Reference#l_NRF_getSecurityStatus
That almost does what I've been looking for. But is there a way to tell if the Espruino Web IDE is connected to a Bangle.js 2?
© Espruino, powered by microcosm.
Report a problem