/*
Arduino | general
! MASK-Shadow Friday, March 20, 2026 12:04 PM
https://wokwi.com/projects/459028633100076033
here i sthe project link
*/
#include <Arduino.h>
#define STEP_PIN 19
#define DIR_PIN 18
void setup() {
pinMode(STEP_PIN, OUTPUT);
pinMode(DIR_PIN, OUTPUT);
digitalWrite(DIR_PIN, HIGH); // set direction
}
void loop() {
// Rotate 200 steps (1 full revolution for most steppers)
for (int i = 0; i < 200; i++) {
digitalWrite(STEP_PIN, HIGH);
delayMicroseconds(1000);
digitalWrite(STEP_PIN, LOW);
delayMicroseconds(1000);
}
delay(1000); // wait 1 second
// Reverse direction (optional)
digitalWrite(DIR_PIN, !digitalRead(DIR_PIN));
}