lcd pulser

Hi You might think i am mad i am looking for an up/down pulser sketch so i can connect any stepper motor with threaded rod or belt driven ( not sure what to call it ) but an x y or z axis pulse it over the largest length i can then divide length and steps to get as accurate as possible number. I am saying up/so it can be run back if need be to a good dividing number. I have the drobot lcd button shield and some easy driver 4.4 and an L298N DC Stepper Motor and a few steppers all bipolar. Does anybody know of a sketch that might be suitable for this. Cheers Bill