I am a newbie here, and i am working on my first project with an ESP32 DEVkit.
My project is to count pulse that is generated from a pulse generator board using an ESP32 board and it displays the count on the LCD 16x2 (JHD 161A).
i was successful in getting the pulse to display on the LCD and it works fine, but the problem i seem to be facing is when power shuts down/Fails, the pulse resets to ZERO. my requirement is to save the pulse right before power fails and with a few reads on the forum i have understood that we need some power supply to keep the ESP32 board to work, so the save happens.
The power supply im using which supplies 5V shuts down ONE second after a power failure so i am assuming there is enough time to save/write the data( pulse count) to the ESP
if anyone can help me, or guide me as to how to write a sketch to make a write and read to the EEPROM, it will be really helpful.
hi, i tried checking out the links but , there is no way i could understand. is there a way you could write a sketch for me with the above mentioned requirements or maybe a way to do this project using c/c++
Im not an expert in coding languages , any help would be great....
The problem with EEPROM is "wear" if you write too often. This makes it impractical to continuously update many times per second.
An interesting trick is to use a RTC module such as the cheap DS1307 whose timekeeping is considered poor but which contains CMOS RAM backed up by the coin cell on the module. This means you can (albeit with the delay of the I2C interface) write to it hundreds of times per second "forever" and not lose the tally.
Paul__B:
The problem with EEPROM is "wear" if you write too often. This makes it impractical to continuously update many times per second.
An interesting trick is to use a RTC module such as the cheap DS1307 whose timekeeping is considered poor but which contains CMOS RAM backed up by the coin cell on the module. This means you can (albeit with the delay of the I2C interface) write to it hundreds of times per second "forever" and not lose the tally.
@Paul thank you, but i was thinking about using SPIFFS to do a write/read. are there any documentation i can refer to in order to get a working code ???
praji18:
hi, i tried checking out the links but , there is no way i could understand. is there a way you could write a sketch for me with the above mentioned requirements or maybe a way to do this project using c/c++
Im not an expert in coding languages , any help would be great....
I could write code for you. I require a 5,000USD deposit of good faith. I bill in 4 hour increments, prepaid, at 250.00USD per hour. Plus expenses.