As you can see in the file, when we hold on the button, the motor will start to move. After that, when we drag the arrow of the Potentiometer to up, the motor speed will increase and the brightness of the LED will increase, but when we drag the arrow of the Potentiometer to down, the motor speed will decrease and the brightness of the LED will decrease.
To build the circuit, I used:
-
Arduino board.
-
Stepper motor.
-
Button for the Stepper motor.
-
L293D motor driver.
-
Potentiometer, to control the speed of the Stepper motor (increase and decrease the speed).
-
LED, to measure the motor speed (high speed, medium speed, low speed) by the brightness of the LED.