Stepper motor needs to go in reverse

I have two stepper motors that I have running in sync via two drivers connected to an arduino Uno. I want them to both run in one direction then run in the other direction. I cant get them to turn the other way! I’m new to coding so help would be appreciated. Thanks!

#include <Stepper.h>

// steps value is 360 / degree angle of motor
#define STEPS 200

// create a stepper object on pins 4, 5, 6 and 7
Stepper stepper1(STEPS, 4, 5, 6, 7);
Stepper stepper2(STEPS, 11, 10, 9, 8);

void setup()
{
}

void loop()
{
  stepper1.setSpeed(60);
  stepper2.setSpeed(60);
  stepper1.step(200);
  stepper2.step(50);
  delay(100);
  stepper1.step(-200);
  stepper2.step(-50);
  
  
}

Please take the time to read the two posts by Nick Gammon at the top of this Forum for guidelines on posting here, especially the use of code tags when posting code. Also, saying something “doesn’t work” is not enough detail for us to help. What happens when the code tries to reverse the direction; nothing, vibration, heat…what? What kind of steppers are they, what are the stepper control modules, and how do you have them wired?

Sorry about that, when I run the program the motors keep running in the same direction as if I didn’t even change anything (and yes I’m sure it uploaded correctly). These are 28BYJ-48 – 5V Stepper Motors:
http://robocraft.ru/files/datasheet/28BYJ-48.pdf
They are being controlled by two uln2003a driver boards.
(Wiring image attached, I can supply more if necessary)

Have you tried a short program with a single motor.?

Get that to work first.

...R

I tried that, It works but I think my code is the reason why it won't work with two? Any speculation?

shibe: I tried that, It works but I think my code is the reason why it won't work with two? Any speculation?

Can you post that code so we can compare it with the non-working code ?

Have you tried extending a copy of the working code so it controls a second motor ?

In the code you have in your Original Post does it work if you only have one motor connected ? Does it matter which one is connected ?

Does it work if you have only one ULN2003 connected ? Does it matter which one is connected ?

How are you powering the motors ? I hope you are not trying to power them from the Arduino 5v pin. They should have a separate power supply with a common GND.

...R