Storing encoder positions

Hi

I have a motor that has a resistance change pickup attached to it.

What i would like to do is first move the motor to one of its limits then record the span to its other limit and then centralise the motor.

After that i would like to be able to use 3 buttons as memory locations and be able to move the motor to a location, save it to button 1, 2 or 3 the if i move the motor it will return to any of the saved positions when one of the 3 buttons is pressed.

Thank you

So your code looks like what now?

save it to button 1, 2 or 3

Do your buttons have any way to store data? I've never heard of one that can.

ullisees:
I have a motor that has a resistance change pickup attached to it.

What is a "resistance change pickup"? Can you point to the specifications for the motor/pickup? As long as the "resistance change pickup" provides absolute position information then you can write a sketch to do what you want.

Start with collecting your data.

.... and apply a button to any value you want.

In your case they will hardly ever change.

So you might define your values as constants. Thats really easy.

In most cases, the most simple solution is the best solution.