• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Hire Me | Contact | Calculators-online
You are here: Home / Lamps and Lights / Blinking 3 LEDs (R,G,B) Sequentially Using Arduino Circuit

Blinking 3 LEDs (R,G,B) Sequentially Using Arduino Circuit

Last Updated on June 1, 2026 by Swagatam 6 Comments

In this post I have explained how to run or blink three LEDs in sequence using Arduino. The post was written and submitted by: Jack Franko

Table of Contents
  • DESCRIPTION

PROGRAM
/* make RGB LEDs to blink in series one by one at interval
of 1000MS */

int R = 12;int G = 11;int B = 10;
void setup(){  pinMode
(R,OUTPUT);  pinMode
(G,OUTPUT);  pinMode
(B,OUTPUT);

}
void loop(){  digitalWrite
(R,HIGH);  delay (1000);  digitalWrite
(R,LOW);  delay (1000);  digitalWrite
(G,HIGH);  delay (1000);  digitalWrite
(G,LOW);  delay (1000);  digitalWrite
(B,HIGH);  delay (1000);  digitalWrite
(B,LOW);  delay (1000);

}

DESCRIPTION

Today, We are  going
to learn to turn on and off  3 LEDs (RED, GREEN, BLUE) one by one at the interval of
1000MS that is one second.
int R = 12;int G = 11;int B = 10;

as we are aware of integer statement we had learned before ,
today we will use integer R,G & B which will be set  on arduino pin no 12, 11 and 10 respectively.
We are using R,G and B for led colors  to set on and off it confidentially to make less complicated and easy to understand what we are doing.
After setting all integers as shown in program above, we will set the main program part which is void setup stated as below

void setup(){  pinMode
(R,OUTPUT);  pinMode
(G,OUTPUT);  pinMode
(B,OUTPUT);

void loop(){  digitalWrite
(R,HIGH);  delay (1000);  digitalWrite
(R,LOW);  delay (1000);  digitalWrite
(G,HIGH);  delay (1000);  digitalWrite
(G,LOW);  delay (1000);  digitalWrite
(B,HIGH);  delay (1000);  digitalWrite
(B,LOW);  delay (1000);

} Here in statement of loop we are telling arduino to work with pin no 12 which is stated as R in integer and output in void setup. We will tell arduino to set pin no 12 at position “high” which means “ON” and wait for one second which 1000MS in arithmetical language with the help of function “delay” . script stated below will set led to on position and it will wait for 1 second but Arduino will not understand that what to do after waiting for 1 second, this will leads to stay led in on position for long.

  digitalWrite
(R,HIGH);  delay (1000);

so after  one second we must tell arduino to set pin no” 12” ie” R” to position” low”  which is “OFF”.

  digitalWrite
(R,LOW);

the statement stated above will set the led off . If we dint comment to wait for 1 second Arduino will continue to read the loop and turn the LED  to “ON” position frequently .so at this stage we have to comment and state the delay function to tell Arduino that after pin no 12 in “ OFF” wait for 1 second which 1000MS.

  delay (1000);

this is a complete loop for pin no 12 which we had stated for RED LED. This will result to put ON the led and wait for 1 second and OFF the LED and wait for 1 Second. After this we have to set the same loop for GREEN and BLUE LED which is as follows.

  digitalWrite
(G,HIGH);  delay (1000);  digitalWrite
(G,LOW);  delay (1000);  digitalWrite
(B,HIGH);  delay (1000);  digitalWrite
(B,LOW);  delay (1000);

this program will set three LEDs R, G & B to turn “ON” and “OFF” respectively for long time. Her you can program more then 3 LEDs also to turn on and off as you wish. This tutorials are for Newbees to understand the program and to play with Arduino.

You'll also like:

  • How to Connect Car LED Downlight: Circuit Diagram
  • Infrared (IR) Controlled LED Emergency Lamp Circuit
  • LED pwm control circuitLED PWM Controlled Tubelight Circuit
  • simple single transistor street light circuit7 Automatic Street Light Circuits [Using Relays and Solar Panel]

Filed Under: Lamps and Lights Tagged With: Arduino, Blinking, LEDs, Sequentially

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!

Previous Post: « Tuned Infrared (IR) Detector Circuit
Next Post: Make this Simple Set Reset Circuit using IC 555 »

Reader Interactions

Questions & Answers

Total Posts: 6
Newest Oldest
Sammy Schutz
September 6, 2019 • 7 years ago #69952

Hi Swagatam,
I am in need of some help.
How would you build a circuit to have 3 three LEDs blink in sequence? Could you describe what the actual circuit layout would look like? I am using the NI Elvis Platform.
Thank you,
Sammy

Reply
SwagatamAdmin
September 6, 2019 • 7 years ago #69965

Hi Sammy,

By “blinking” do you mean the LEDs should “chase” or “run” in sequence?

Reply
Sammy Schutz
September 6, 2019 • 7 years ago #69983

I mean that as soon as one turns on it turns off and then the next light turns on and then off and so on. I’m not sure what the proper terminology for that is.

Reply
SwagatamAdmin
September 7, 2019 • 7 years ago #69997

OK you can try the first circuit from this post, with one modification.

Disconnect IC 4017 IC pin15 from ground and connect it with its pin7

https://www.homemade-circuits.com/knight-rider-led-chaser-circuit-mains/

Reply
axel carreon
February 27, 2023 • 4 years ago #140581

Hi Swagatam,

Im a newbee on Arduino but willing to learn basics. What type of Arduino kit will i use? For the blinking 3 LED’s.

Reply
SwagatamAdmin
February 28, 2023 • 4 years ago #140592

Hi Axel, you can use an Arduino UNO board. For more information on Arduino basics, you can refer to the following post:
https://www.homemade-circuits.com/learning-basic-arduino-programming-tutorial-for-the-newcomers/

Reply

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

My YouTube Channel

Circuit Simulator: Draw and Simulate Schematics

circuit simulator image

Categories

  • Arduino Projects (95)
  • Audio and Amplifier Projects (134)
  • Automation Projects (18)
  • Automobile Electronics (104)
  • Battery Charger Circuits (90)
  • Datasheets and Components (109)
  • Electronics Theory (151)
  • Energy from Magnets and Earth (43)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (20)
  • Health related Projects (27)
  • Home Electrical Circuits (13)
  • Indicator Circuits (16)
  • Inverter Circuits (98)
  • Lamps and Lights (161)
  • Meters and Testers (72)
  • Mini Projects (28)
  • Motor Controller (68)
  • Oscillator Circuits (30)
  • Pets and Pests (15)
  • Power Supply Circuits (91)
  • Remote Control Circuits (50)
  • Security and Alarm (65)
  • Sensors and Detectors (107)
  • SMPS and Converters (46)
  • Solar Controller Circuits (62)
  • Temperature Controllers (44)
  • Timer and Delay Relay (51)
  • Voltage Control and Protection (44)
  • Water Controller (37)
  • Wireless Circuits (31)

Subscribe to get New Circuits in your Email

Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

People also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Recent Comments

  • Swagatam on 24V to 12V DC Converter Circuit [using Switching Regulator]
  • Swagatam on Automatic Battery Full Cut-Off Latching Circuit with Trickle Charging
  • Ramin on Automatic Battery Full Cut-Off Latching Circuit with Trickle Charging
  • Joss on 24V to 12V DC Converter Circuit [using Switching Regulator]
  • Swagatam on Simple Capacitive Discharge Ignition (CDI) Circuit

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Stack Exchange
  • Linkedin

Calculators

  • ZVS Induction Heater + Tank Calculator Tool
  • Zener Diode Calculator
  • Wire Current and Thickness Calculator (Ampacity Calculator)
  • Voltage Divider Calculator
  • Transistor Base Resistor Calculator
  • Transistor Astable Multivibrator Calculator
  • TL431 Calculator
  • Solar Panel, Inverter, Battery Calculator
  • Ferrite Core Air Gap Calculator Tool
  • Parallel MOSFET Calculator Tool: How to Connect MOSFETs in Parallel Safely
  • LC Resonance Calculator for EV Battery Charger Circuits
  • LED String Series Resistor Calculator
  • PFC (Power Factor Correction) Calculator Tool: 3kW
  • Passive Power Factor Correction (PFC) Calculator
  • LM567 IC Calculator Tool
  • SMPS Flyback Boost Converter Calculator
  • Shunt Resistor Calculator for Ammeters
  • SCR and Triac Gate Resistor Calculator
  • Battery Back up Time Calculator
  • Boost Converter Calculator (Non-Isolated)
  • Bootstrap Capacitor Calculator
  • Buck Converter Calculator
  • Buck-Boost Converter Calculator
  • Capacitance Reactance Calculator
  • DCM Flyback Transformer & Wire Gauge Wire Size Calculator Tool
  • Filter Capacitor Calculator
  • IC 4047 Calculator (Frequency and PWM)
  • IC 4060 Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • IC SG3525, SG3524 Calculator
  • Inductance Calculator
  • Induction Heater Inductor and Resonant Frequency Calculator
  • Induction Heater Work Coil Calculator
  • Inverter LC Filter Calculator
  • LC Resonance Calculator
  • LED Current Calculator
  • LM317, LM338, LM396 Calculator
  • NAND/NOT Gate RC Values Calculator
  • NOT, NAND Gate Frequency Calculator
  • Notch Filter Calculator Tool
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • RC Filter Calculator
  • Reactance Calculator
  • Sine Table Calculator for SPWM Arduino Code
  • Small Signal Transistor(BJT) and Diode Quick Datasheet
  • SMPS Calculator for Toroidal Ferrite Transformers
  • SMPS Flyback Transformer Calculator – Design by Target Duty Cycle
  • TL431 Calculator
  • Op-Amp Hysteresis Resistor Calculator

© 2026 · Swagatam Innovations