I recently built a simple telescope focuser controller with an arduino (4 buttons and a stepper driver attached to the focus knob) and am already working away on Mk2.
In the latest iteration I have a LCD that will display how many steps the motor has moved so I can replicate focusing positions between different lenses.
What I'm looking for help with is how to store the information so the next time I power on the arduino the step count isnt lost. I can think of 2 ways to do this and am wondering if you guys have any more suggestions.
1) In my loop script check to see if the step count matches whats in the EEPROM, if not do a EEPROM write to update it. Im worried that I will stress the EEPROM as the values could change a lot in a single session.
2) rig up some sort of power/sleep button that would store the current step count value to the EEPROM then shut down the arduino. Is there a circuit that I can make that will send a value on analog or digital, give the arduino enough time to store the info then cut the power? (capacitor maybe?)