is it possible to stop sending advertisements? I have solar, so during the day the power use is zero (mostly). But because it is resending the last read value, I am currently just sending a 0 (zero) value for power every 30 seconds just to clear it. It is not energy efficient, as I am just sending zero all the time until the next pulse is read, which may be in the afternoon - hours later.
I would like to be able to check if last power value was zero and if it was, then stop advertising it.
setInterval(function() {
power = 0;
if (sDate.getMinutes()==0) {
update();
}
NRF.setAdvertising({
0x1809 : [E.getTemperature()],
0x180f : [Puck.getBatteryPercentage()],
0x2a03 : [String(power)]
});
print("Battery and temp data sent");
}, 30000);
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.
is it possible to stop sending advertisements? I have solar, so during the day the power use is zero (mostly). But because it is resending the last read value, I am currently just sending a 0 (zero) value for power every 30 seconds just to clear it. It is not energy efficient, as I am just sending zero all the time until the next pulse is read, which may be in the afternoon - hours later.
I would like to be able to check if last power value was zero and if it was, then stop advertising it.