In this tutorial, we will learn how to control led blinking speed by potentiometer using Arduino.
In old televisions and stereo, you might have seen a knob rounded button for changing the channel and adjusting volume.
Mainly you had seen light strings in which this type of function is used. We control the delay time of LED blinking, we replace the value of the delay time from the potentiometer reading variable.
Arduino read Analog value by analogRead Function. The voltage is adjusted by the potentiometer.
Components Needed
- Potentiometer
- Arduino Uno
- LED
- Resistor
Potentiometer Pinout

Pin Connections
Potentiometer and LED Pins | Arduino Pins |
---|---|
5v or Vin | 5V |
GND | GND |
Vout | A0 |
LED anode | D5 |
LED cathode | GND |
Use of Resistor with LED is mandatory otherwise LED will burst.
Circuit Diagram of Arduino Potentiometer Interface
Connect the potentiometer and led with Arduino according to the below circuit diagram.

Code for Arduino potentiometer led blink
Upload the below code and adjust the potentiometer knob to see the change in the blinking rate of led.
Output

If the voltage on pin decreases on increasing the rotation of the potentiometer, you can reverse the connections of the VCC and GND pins.