merging sketches help! please

Please modify your post and use the code button </> so your code looks like this and is easy to copy to a text editor. See How to use the Forum. I bet your code does not have smileys :slight_smile:

This Simple Stepper Code may get you started.

How can you expect anything to happen on pin 4 with this code?

digitalWrite(13, HIGH);   // Turns ON Relay on digital pin 4

If you want a responsive program don't use delay() anywhere. Have a look at how millis() is used to manage timing without blocking in several things at a time

...R
Planning and Implementing a Program