The same sketch worked before but not now [solved]

Hi All,

I used a simple code + Arduino Uno R3 + Big Easy Driver to control my stepper motor. Here is my code:

#include <Stepper.h> 
Stepper stepper(20,3,2); 

void setup() 
{
  
   
}

void loop()
{
  stepper.setSpeed(150); 
  stepper.step(240); 
  delay(1000);
  stepper.setSpeed(150);
  stepper.step(-240); 
  delay(1000);
}

This code worked well yesterday. But I re-tested it today, I got no luck. Everything else is kept exactly the same. I checked the connection, it's good. I tried out several motors, but none of them responded. I tried out another drive Easy Driver, nope. I even tried out the "Blink" code, this code worked! And all the sketches were uploaded successfully...

Anyone experienced this "unreliable" situation before? Thanks!

Best,
Sonia

I've seen this kind of thing before, alot.

The source of "this "unreliable" situation" is you! You have changed something.

Mark

I think I got it figured out! It's because the battery I used for powering the driver was running out. Though LED on the driver was on, the battery is below the trigger voltage, I believe is 7V, I switched to another battery, everything back to normal. I post it here in case anyone else has the same problem. Thanks anyway!