Handling EMPTY variable

Hello, I have project with central arduino unit and remote wireless temperature probes sending values of temperature. I would like to know how to properly handle situation when probe is offline. Lets say we have variable called $temp which is updated every minute. When remote probe goes offline, $temp will be set by arduino to for example 3333 to indicate error. But i want to send to blynk server just some empty value, because 3333 will mess my statistics and charts. Is there a way to send some invalid value or just “nothing” but only for one probe, other probes will be synced to blynk as always. Thanks.

You will need to use code on the device and if then comparisons to change values before sending to the App.

read value
if value == 3333 then value = 0
send value to app

https://www.arduino.cc/reference/en/

Or do not send “value” at all, if it is in error condition

so this would be correct approach?

BLYNK_READ(V7)
{
if (temp1!=3333)

Blynk.virtualWrite(V7, temp1); //sending to Blynk

}

but I do NOT want to send 0, because on the graph there will be 0 degrees

You said empty value… 0 is fairly empty last I checked :stuck_out_tongue_winking_eye: Send whatever you want :wink: … However, as already stated above, best to just not send any value then. And your function seems to do just that :slight_smile: Test it and see.

Thank you guys, I will first have to free some memory on UNO board, but I hope this will work. Have a nice day.

Send NULL. This usually means empty I think :slight_smile:

It’s different from 0, 0 is the mathematical 0 and NULL should be empty so you can compare it with, also NULL, to indicate an error.

I guess it is!
I use to use it without
BLYNK_READ(V7){
}

Hello, thak you for responses, it helped me much.