Different from the last lab, we use the rotary encoder to control the stepper motor, the steeper motor will rolate at the same frequency and direction as the rotary encoder.
We used the following components:
1 x Elegoo Uno R3
1 x 830 tie-points breadboard
1 x rotary encoder module
1 x ULN2003 stepper motor driver module
1 x Stepper motor
1 x Power supply module
1 x 9V1A adapter
9 x F-M wires
1 x M-M wires


The code control the stepper motor with the same frenquency as the rotary encoder
The final connection:
