The running light project is a simple electronic project based on the Arduino Uno that creates dynamic visual effects by sequentially lighting up and turning off LEDs. This project is not only suitable for beginners to learn how to control hardware with Arduino but also helps understand basic programming logic and circuit knowledge. In this project, we will use 7 LEDs and write code to control them to light up in sequence, forming a flowing effect. This project can serve as an introductory practice for learning digital electronics and microcontroller programming.
Materials Needed:- 1 x Arduino UNO board
- 7 x LEDs
- 7 x 220Ω resistors (one for each LED to limit the current flowing through the LED)
- 1 x Breadboard (optional, for easy connections)
- Assorted jumper wires (for connecting components)
Let's create an online simulation to identify any potential issues.
Connection Steps:Connecting LEDs and Resistors:
- Connect the long leg (anode) of each LED to a digital pin on the Arduino Uno ( pins 3, 4, 5, 6, 7, 8, 9).
- Connect the short leg (cathode) of each LED through a220Ω resistor to the GND pin.
Connecting Resistors to GND:
- The other end of each 220Ω resistor should be connected to the GND pin.
Running Light Effects:
The program implements several different LED display modes within the `loop()` function.
Individual Lighting: First, the program lights up each LED individually, with each LED staying on for 100 milliseconds before turning off and moving on to the next LED.
All On: Then, the program lights up all LEDs at the same time, maintaining this for 1 second.
Individual Extinguishing: Next, the program turns off each LED individually, with each LED staying on for 100 milliseconds before extinguishing.
Individual Blinking: Finally, each LED blinks on its own three times, staying on for 300 milliseconds each time, with a 300-millisecond interval between blinks.
Loop Delay: After each mode ends, the program waits for 1 second before repeating the above modes, forming a loop.
Join the PCBX community to simulate your projects for free
https://www.pcbx.com/forum?mtm_campaign=E&mtm_kwd=hack
Register now, and get a FREE PCB/PCBA coupon for your first prototyping.
Comments
Please log in or sign up to comment.