ezButton library

I currently have a code written to control two stepper motors with a joystick. I also have a separate code to control a different stepper with a push button using the ezButton library. However when I join the two only the joystick code works. Any help is welcome.

joystick_stepper.ino (2.35 KB)

In the button side, it 's better to use: button.setDebounceTime(50); // set debounce time to 50 milliseconds in the setup() function.

The ezButton library is non-blocking. It will not effect to your motor code.
Please not that button.isPressed() function return true ONLY one time each time the button press. If you want to check the current state is still pressing or not, use button.getState(). This function returns LOW when button is pressing.

I think you need to check the code login in this part:

 if (button.isPressed()) {
    Serial.println("Button is Pressed");
    digitalWrite (IN9, LOW);
    digitalWrite (IN10, LOW);
    digitalWrite (IN11, LOW);
    digitalWrite (IN12, LOW);

The code in else block MAY cause the trouble.