How to save water flow input to EEPROM

I need help for my project, how can I save my water usage data without pull off the source.
I already tried with EEPROM but my NodeMCU not responding with my water flow program.

It just “totalLitres” only shown in serial monitor.

Monitoring.ino (1.51 KB)

Read the "how to post" sticky, so you know how to post code inline with code tags.

Not sure why you use a NodeMCU for this if you don't use it's WiFi capability.
And why the SoftwareSerial. The NodeMCU has a USB port.

A NodeMCU has lots of internal flash menory (SPIFFS) to store months or even years of data with timestamps.
And can serve up a graph on a mobile phone or PC via WiFi. Stand-alone or via the home router.

This guide has a DS18B20 temp logger/server example with timestamps (NTP).
The temp part could be changed to waterflow.
Leo..

I already tried with EEPROM but my NodeMCU not responding

What did you try?

The "eeprom" in the 8266 is a special section of flash emulating the eeprom. There is a library to use the "eeprom" in an esp8266 and it requires some specific commands.

https://arduino-esp8266.readthedocs.io/en/latest/libraries.html

https://github.com/esp8266/Arduino/tree/master/libraries/EEPROM