time lapse dolly code problems

thank you very much for the help Paul. i didn't realise that could be done with the hold in resistors . maybe i should have researched more but thanks for being patient.
as i have said i have put the delays in there to stop camera movement when im taking a long exposure picture but if your telling me there is a better way im open to ideas. im not being facetious but i dont understand why the delays are a problem if you could explain that to me i would be very appreciative.
sorry if it seems obvious

thanks again for all your help.