Adjustable LED flasher-first potentiometer using Arduino

Today we will make a Adjustable LED flasher-first potentiometer using Arduino. It is first time that we use it.

First to use potentiometer on Arduino
Arduino has the analog input pin (A0 to A5 for read any signals. When we apply voltage to potentiometer and to analog input pin Arduino. We can apply to control electornics appliance. When we rotate the potentiometer make a voltage across it change. The arduino can read this changing. As Figure 1 analog input pins and Power output pins that we use with the potentiometer.


Figure 1 Analog input and Power output

Parts you will need
We have to find the parts below.
• Arduino UNO R3
• potentiometer 100K
• one LED
• 470 ohms resistor
• jumper wires
• Breadboard

How to builds
We look at schematic in Figure 2 and then connect circuits as Figure 3 and Figure 4.
Figure 2 Schematic

Figure 3 Circuit connection

Figure 4 Adjustable LED flasher first potentiometer using Arduino

Next we write the LED flasher code on the arduino IDE as Figure 5

Figure 5 1 LED flasher Arduino IDE code

First time for learn to use the potentiometer by AnalogRead.

int LEDPin = 8;

void setup() {
pinMode(LEDPin , OUTPUT);


void loop() {
// read the input on analog pin 0:
int delay1 = analogRead(A0);

delay(1); // delay in between reads for stability

digitalWrite(LEDPin, HIGH); // turn the LED on (HIGH is the voltage level)
delay(delay1); // wait for a second
digitalWrite(LEDPin, LOW); // turn the LED off by making the voltage LOW
delay(delay1); // wait for a second

We will see that command “analogRead(A0” to used to read the analog or voltage.
Then the arduino will be processed into any one variable from 0-1023 we bring the value to delay1. For the one LED flasher code can read at one LED flasher

As video we test to rotate the potentiometer cause LED flasher slow-fast.

Sharing is caring!

How to learn electronics with simple ways

Related Posts


I always try to make Electronics Learning Easy.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Notify of
Close Menu