Programming stepper motors to move until limit switches

Do you have a pulldown resistor (about 10k) connected between input pin and GND?