Easy Basics: Project 012d Disco: Flowing LED Lights

of Acoptex.com in UNO

Basics: Project 012d

Project name: Disco lights or Flowing LED Lights

Attachments: program1 

In this project, you needed these parts :

1.Aruduino Uno R3 (you can also use the other version of Arduino)

2.Arduino IDE ( you can download it from here  )

3.Jumper cables

4. LED 8 pcs (different colors)

5. Resistor 8 pcs (220 Om)

6. Breadboard


In this project we will use LEDs to create flowing LED lights. Eight LEDs in a row successively light up and dim one after another, just like flowing water.

Signals and connections of LED

The operating voltage of the LED is 1.8V and the operating current is 10mA-20mA. The Arduino Uno board can supply 5V or 3.3V power. We will use 5V for this project, so the minimum resistance of the current limiting resistor should be (5 V to 1.8 V)/20 = 160 Om. The 220 Om offered in the kit is suitable and you can also choose other resistors that meet the condition. The larger the resistance is, the dimmer the LED will get.

Build the circuit

The following picture shows the needed connections with the Arduino Uno 


We simply need to turn on eight LEDs in turn. The eight LEDs are connected to pin 2-pin 9 respectively. Set them as High level and the corresponding LED at the pins will light up. Control the time of each LED brightening and you will see flowing LED lights.

Set an integer variable to int, and set pin2-pin9 as OUTPUT respectively. 

In code, we set the pin 2 to pin 9 as HIGH, then pin 9 to pin 2 as LOW, then pin 9 to pin 2 as HIGH, then pin 2 to pin 9 as LOW. 

Step by Step instruction

  1. Plug your Adruino Uno board into your PC and select the correct board and com port
  2. Open up serial monitor and set your baud to 9600 baud
  3. Verify and upload the the sketch to your Adruino Uno board
  4. You should see 8 LEDs brighten one by one from the LED connected to pin 2 to that to pin 9, and then dim in turn from the LED at pin 9 to the one at pin 2. After that, the LEDs will light up from the LED at pin 9 to that at pin 2 and dim from the LED at pin 2 to that at pin 9. 
  5. This whole process will repeat until the circuit is powered off.


We have learned how to light up and dim one after another LEDs in row, just like flowing water.


  • No libraries required for this project


  • See attachments on the begining of this project description. 

Other projects of Acoptex.com
Easy Merry Xmas to everyone of Acoptex.com, Not selected 24-12-2019

Published at 21-07-2017
Viewed: 641 times