Flow meter zero after arduino reset hydroponic monitor

Hello, i doing a project in wichamong others i will have 6 flow meters on a arduino uno wifi rev2. Till now i have 3 of them. My issue is that althougt i have a volume widget for total volume, every time the arduino restart this value goes to zero. Can somebody help me? I want to always add the new measurment.

you will have to store the last data in the arduino EEPROM.

Thank you very much for your answer. I dont know really how to do this. My code is this. Can you help?trofodosia.txt (7.3 KB)

here a good tutorial you can follow Official EEPROM library: support and reference. - Programming Questions - Arduino Forum

Hello, is there any way to read a value from a virtual channel and resend it to another virtual channel. For example, the flow sensor sends on Virtual5 300. Cayenne sends back to arduino the 300 and after that arduino sends to a new virtual channel the 300 + new flow sensor value? Propably with cayenne_in but i cannot figure it out how.

you mean to send that between two arduino devices?

No. Same device.

I need something like
CAYENNE_OUT(V5) {Cayenne.virtualWrite(V5, totalMilliLitres1…
CAYENNE_OUT(V25) {Cayenne.virtualWrite(V25, totalMilliLitres1+CAYENNE_IN(V5)}

I dont know how exactly should i write it.

just use global totalMilliLitres1 and use in both CAYENNE_OUT function.

i want the second OUT to be the first OUT plus the new totalMilliLitres1.
Not the same totalMilliLitres1 to both CAYENNE_OUT

but would that not be the same :thinking:
what will be changed, when you send totalMilliLitres1 in first CAYENNE_OUT and if received back?

ok i will try it. But how will the CAYENNE_IN will be added to the new OUT(V25)?

what do you want to achieve with this?
just store the value in a variable and use it.


how is cayenne_in stores the value on a variable? i cannot find out how. thank you for your help.

int x = getValue.asInt();

i see. thank you very much

Hello, i cannot manage to resend the x to dashboard.
I am trying with
Cayenne.virtualWrite(V2, x);

Where i am wrong?