Hi
Have a code that sends BLE advertising like this:
NRF.setAdvertising([{
0x2a03 : [String(power)],
0x2a04 : [String(pulseHour)],
0x180f : [Puck.getBatteryPercentage()]}],
{interval: 600}
// name: "PM \xE2\x9A\xA1"} // default is 375 - save a bit of power
);
The "power" variable is instantaneous power that I display between pulses. But the issue that I have is that when there is a delay between pulses that goes for too long (have solar), it keeps retransmitting the last value.
Is it possible to manipulate it somehow, so that I can put some code in between the interval resends?
Like if time difference between pulses is over 60 seconds, it will set the "power" variable to 0
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.
Hi
Have a code that sends BLE advertising like this:
The "power" variable is instantaneous power that I display between pulses. But the issue that I have is that when there is a delay between pulses that goes for too long (have solar), it keeps retransmitting the last value.
Is it possible to manipulate it somehow, so that I can put some code in between the interval resends?
Like if time difference between pulses is over 60 seconds, it will set the "power" variable to 0