Introduction:

This is Simple LED blinking program with variation in its speed. In this Arduino is interfaced with multiple LEDs and potentiometer of 10 Kilo Ohm. The ON/ OFF period of LEDs i.e its speed can varied using potentiometer. With the help of Arduino we can achieve this.

We use the analog.Read function of Arduino. Analog read reads the value of voltage on particular analog input pin.

For e.g.

int abc = analog.Read(A0);

will read the analog input pin A0 into the variable abc. The Analong-to-Digital Converter of Arduino is 10-bit wide, so the 0-5v entire range will be divided into 0-1023.

The minimum result we get when we scan a pot connected to analog pin is 0 and the maximum value we get is 1023, we are simply using this result as delay in milliseconds to control the speed of our LED chaser program

Components required:

  • 1 x Arduino Board with USB cable
  • 1 x bread Board
  • 1 x 10k Potentiometer
  • 8 x Light Emitting Diodes
  • 8 x 220 Ohm Resistors
  • Bread Board connecting wires

Arduino Schematic:

Led Blinking Bb Pot

 

Assemble the circuit as shown in the above diagram. The program for Arduino is mentioned below. Please check the connections twice before you give power to the circuit. Paste below code in arduino and upload it to the board.

Code: