Momentary buttons and stepper motors

I have been trying to use a momentary button as a toggle switch to power on and off a servo motor paired with an easydriver. Can anybody help us identify what is wrong with our coding?

test.ino (863 Bytes)

Can anybody help us identify what is wrong with our coding?

No, because you didn't tell us what it actually does, or what you expect it to do.

All I want to do is be able to push the momentary button and make the motor move forward and then push it again to make the motor stop moving. I'm sorry if this is still unclear

  pinMode(3,INPUT);

How IS the switch wired to this pin? Using INPUT_PULLUP means that you don't need the external pullup or pulldown resistor. You DO have one of them, right?

If you DO have a servo motor, you do NOT make it move by writing a pin HIGH or LOW. You use the Servo library, and control its position or speed (not both).

Your subject line mentions stepper motors. Then you talk about a servo. And the code looks more like it may be written for two DC motors. Difficult to tell with no comments.

I don't know if you're confused but I certainly am.

Steve