Skip to content

Commit 36062db

Browse files
authored
Update stepper-library-examples.md
Description: The default Stepper library examples often use the sequence (8, 9, 10, 11). However, for the widely used 28BYJ-48 stepper motor paired with the ULN2003 driver board, this sequence causes vibration without rotation. Updating the pin definition to (8, 10, 9, 11) correctly sequences the internal coils, ensuring smooth rotation as intended by the tutorial.
1 parent e32890c commit 36062db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/learn/04.electronics/04.stepper-motors/stepper-library-examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ A stepper motor follows the turns of a potentiometer (or other sensor) on analog
5454
// create an instance of the stepper class, specifying
5555
// the number of steps of the motor and the pins it's
5656
// attached to
57-
Stepper stepper(STEPS, 8, 9, 10, 11);
57+
Stepper stepper(STEPS, 8, 10, 9, 11);
5858
5959
// the previous reading from the analog input
6060
int previous = 0;
@@ -173,4 +173,4 @@ void loop() {
173173
myStepper.step(stepsPerRevolution / 100);
174174
}
175175
}
176-
```
176+
```

0 commit comments

Comments
 (0)