Can anyone please help me i can not save value of total liters in eeprom,the main problem it read and writing while arduino mega working but if power of the value saved in eeprom go back to 0 because the counter starting from 0
Can anyone please help me i can not save value of total liters in eeprom,the main problem it read and writing while arduino mega working but if power of the value saved in eeprom go back to 0 because the counter starting from 0
thanks for your reply , the sketch maybe not compile with you because only compile with arduino mega
i think the value that stored in eeprom in address 1 reset to 0 due to totalMilliLitres value reset to 0 . check the line number 88 pulse count = 0 and void water_daily() declared in void loop .
So what happens here I think is Every time the counter increases, the last value is stored, and when you return to zero, the value is stored zero because the counter returns the value zero again and so on. you can say as rolling odometer
and for divide eeprom_daily = totalMilliLitres /1000 return 1 not less than this value