#include <Stepper.h>
const int stepsPerRevolution = 200;
Stepper stepper(stepsPerRevolution, 8, 9, 10, 11);
const int buttonPin = 7;
int buttonState = 0;
const int buzzerPin = 12;
void setup() {
// put your setup code here, to run once:
stepper.setSpeed(30);
Serial.begin(9600);
pinMode(buttonPin, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH){
stepper.step(stepsPerRevolution);
delay(1000);
}
}