Hi - hopefully some cleaver spark can throw some ideas my way.
I have been playing with a code for a bicycle speed'o'meter. I also wanted to add the function that when power is removed it saves the total mileage.
I am using a 42V battery and a converter to 5V for arduino. I use a voltage sense to trigger the EEPROM saves and this seems to be triggering just fine.
It seems to work, but when my mileage gets to about 2.5 miles, the recalled mileage on startup no longer adds up as expected.
I've tried converting my floating numbers to integers etc, but it still is unreliable.
While I could post the code here, it's massive and a mess at the moment. Can anyone offer any of the shelf tips, or a known working mile or km readout that saves total miles on power down.