Notifications
Clear all
YWRobot Stepper Motor Shield with Arduino UNO Kit
Oct 15, 2026 8:30 am
Member
Joined: 2 years ago
[#86]
This is test reference for
- Stepper Motor Shield YWRobot: https://diycnc.ca/product/stepper-motor-shield-for-a4988-drv8825-driver/
- Arduino UNO: https://diycnc.ca/product/uno-r3-board-atmega328p-arduino-compatible/
1 Reply
Oct 15, 2026 1:48 pm
Member
Joined: 2 years ago
Reference cirkit: https://app.cirkitdesigner.com/project/92846e97-70c3-4e48-bd21-e2beb951df20

Testing script:
const int STEP1 = 3;
const int DIR1 = 2;
const int STEP2 = 5;
const int DIR2 = 4;
const int ENABLE_PIN = 8;
const int STEPS = 1000; // 5 revolutions
const int PULSE_DELAY = 300; // Faster speed
void setup() {
pinMode(STEP1, OUTPUT);
pinMode(DIR1, OUTPUT);
pinMode(STEP2, OUTPUT);
pinMode(DIR2, OUTPUT);
pinMode(ENABLE_PIN, OUTPUT);
digitalWrite(ENABLE_PIN, LOW); // Enable both drivers
}
void loop() {
// Both motors forward
digitalWrite(DIR1, HIGH);
digitalWrite(DIR2, HIGH);
for (int i = 0; i < STEPS; i++) {
digitalWrite(STEP1, HIGH);
digitalWrite(STEP2, HIGH);
delayMicroseconds(PULSE_DELAY);
digitalWrite(STEP1, LOW);
digitalWrite(STEP2, LOW);
delayMicroseconds(PULSE_DELAY);
}
delay(1000);
// Both motors backward
digitalWrite(DIR1, LOW);
digitalWrite(DIR2, LOW);
for (int i = 0; i < STEPS; i++) {
digitalWrite(STEP1, HIGH);
digitalWrite(STEP2, HIGH);
delayMicroseconds(PULSE_DELAY);
digitalWrite(STEP1, LOW);
digitalWrite(STEP2, LOW);
delayMicroseconds(PULSE_DELAY);
}
delay(1000);
}
This post was modified 5 hours ago by Ray
Reply
Forum Information
Our newest member: [email protected]
Latest Post: YWRobot Stepper Motor Shield with Arduino UNO Kit
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed
