// Stepper motor on Wokwi!
#include <Stepper.h>
const int stepsPerRevolution = 400; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
void setup() {
// set the speed at 60 rpm:
myStepper.setSpeed(1);
}
void loop() {
// step one revolution in one direction:
myStepper.step(stepsPerRevolution);
delay(50);
}