For starters -
Upon power up, read the LITRES counter out of two bytes of EEPROM (a WORD variable), write that value to LCD. Then sit in a loop and count the number of pulses and watch the switch. When 3000 pulses have been counted, clear that counter and increment the LITRES counter. Write that value back to EEPROM and update the LCD.
When you detect that a button has been pushed, clear the LITRES counter, updated the LCD and write the ("0") value back to EEPROM.
Bookmarks