// Define pin connections
const int STEP_PIN = 3;
const int DIR_PIN = 4;
void setup() {
pinMode(DIR_PIN, OUTPUT); // Set DIR_PIN as output
pinMode(STEP_PIN, OUTPUT); // Set STEP_PIN as output
}
void loop() {
// //Startup
// digitalWrite(DIR_PIN, HIGH); // Set the direction
// digitalWrite(STEP_PIN, HIGH); // Set STEP_PIN high
// digitalWrite(STEP_PIN, LOW); // Set STEP_PIN low
// //Change the steps
// digitalWrite(DIR_PIN, HIGH); // Set the direction
// for (int i = 0; i < 300; i++) { // Loop to generate the steps
// digitalWrite(STEP_PIN, HIGH); // Set STEP_PIN high
// digitalWrite(STEP_PIN, LOW); // Set STEP_PIN low
// }
//Change the pulse
digitalWrite(DIR_PIN, HIGH); // Set the direction
for (int i = 0; i < 300; i++) { // Loop to generate the steps
digitalWrite(STEP_PIN, HIGH); // Set STEP_PIN high
delayMicroseconds(3000); // Wait for the pulse delay time
digitalWrite(STEP_PIN, LOW); // Set STEP_PIN low
delayMicroseconds(3000); // Wait for the pulse delay time
}
}