Need help with an idea

Thanks all. I had thought about a limit switch; and I may end up going that direction.
As for how I will accomplish the code once; and on startup I believe I've figured that out. Just using a variable I will initially set to zero; but once calibration is done set it to 1; and i'll perform that function only when the variable is zero.

Forgive my lack of probable 'incorrect' wording for variables/methods/etc. Still pretty new at this programming stuff. Haven't done this since high school using old basic! LOL

Also; I should have gotten back to update sooner; but for some reason I can't figure out how to see my posts or when replies are posted. And yes, I have 'notify me of replies' checked..

Thx All!