A basic Arduino Circuit and Code Setup containing A Servo motor along with a Potentiometer. The aim is to control the position of the motor according to the Value of potentiometer.
- Pin 9 (PWM) : Used to send Signal Pin to Servo.
- A1 (Analog Pin) : Used as Input pin for the Value of Potentiometer
- The Code Maps the Value of Potentiometer ( 0 to 1023 ) to the Value acceptable by Motor ( 0 to 180 ). There are two commands so that the motor returns to original position before the next iteration.
Motor.Control.Using.Potentiometer.mp4
Notice how the Angle of Movement in Motor Changes with the Change in Potentiometer
Physical Implementation Video : https://drive.google.com/file/d/1sQcZBEUUSyNKuWz8UvLw-YeGsttM0zi0/view?usp=sharing (Video Credit : https://github.com/Zendovo)