Total newbie here but making progress quickly… super stoked!
My problem is I am running a stepper motor to pull a trolley a certain distance so I need the “program” to only run once… From my searching, everyone says just put those commands into the “void setup” but when i move the “stepper.step(200)” command into the setup, the motor does nothing… in the void loop, it runs great, at a continuous rate and i am able to change the speed by changing the rpms in the code.
The code that runs properly (for ever) is:
// change this to the number of steps on your motor
#define STEPS 200
// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it’s
// attached to
Stepper stepper(STEPS, 00, 01, 02, 03);
I’ve tried moving the stepper.step(50) command into the setup but again, the motor doesn’t budge.
thanks in advance!