I have a project where i run a stepper motor and count the revolutions. I save various data to the SD card via openlog. I have this running for months at a time and have power outages. I would like to write the cycles to a file on the SD card and if there is a power outage during the reboot it reads the file and loads the cycle count from the SD card into the program.
I have been able to find example code on reading a file and writing to serial, but i have not been able to save numbers to use in the program.
Any ideas or help here?