I've found a workaround, it functions, but its not ideal and I doubt it's very efficient in terms of battery power. I check the RSSI (Signal Strength), and illuminate the LED depending on the result:
NRF.setRSSIHandler(function(rssi) {
sigStrength = rssi;
});
function checkRssi() {
if (sigStrength > -51){
digitalWrite(LED1,1);
}
else {digitalWrite(LED1,0);
}
}
function myFunction() {
myVar = setInterval(checkRssi, 3000);
}
myFunction();
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.
Thanks for your help.
I've found a workaround, it functions, but its not ideal and I doubt it's very efficient in terms of battery power. I check the RSSI (Signal Strength), and illuminate the LED depending on the result: