ShreyanRadityan76
Published © GPL3+

Multicolored LED Stream with Buzzer

Create a fast LED stream that goes back and forward while interfacing with buzzer!

BeginnerFull instructions provided149
Multicolored LED Stream with Buzzer

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
Any Arduino Board is fine
×1
Active Buzzer
You only need 1.
×1
5 mm LED: Green
5 mm LED: Green
1 Green LED
×1
5 mm LED: Red
5 mm LED: Red
1 Red LED
×1
5 mm LED: Yellow
5 mm LED: Yellow
1 Yellow LED
×1
LED, Blue
LED, Blue
One one Yellow LED
×1
Breadboard (generic)
Breadboard (generic)
Any breadboard
×1
ELEGOO 130pcs Solderless Flexible Breadboard Jumper Wires 4 Different Lengths Male To Male
ELEGOO 130pcs Solderless Flexible Breadboard Jumper Wires 4 Different Lengths Male To Male
Any jumper wires are fine
×1

Software apps and online services

Arduino IDE
Arduino IDE
The Basic Arduino IDE.
Arduino Web Editor
Arduino Web Editor
A browser alternative to the traditional IDE.

Story

Read more

Schematics

Circuit Schematic

Digital IO pins are color coded based off of the color of the LED pin

Code

MulticoloredLEDStreamWithBuzzer.ino

C/C++
Copy and paste this into the IDE
//Digital Pins/Variables
int blueLED1 = 2; //Blue LED to Pin 2
int yellowLED2 = 3; //Yellow LED to Pin 3
int greenLED3 = 4; //Green LED to Pin 4
int redLED4 = 5; //Red LED to pin 5
int buzzer = 6; //Buzzer to pin 6

void setup() { //Setup Code
  
  pinMode(blueLED1, OUTPUT); //Blue LED as output
  pinMode(yellowLED2, OUTPUT); //Yellow LED as output
  pinMode(greenLED3, OUTPUT); //Green LED as output
  pinMode(redLED4, OUTPUT); //Red LED as output
  pinMode(buzzer, OUTPUT); //Buzzer as output
  digitalWrite(buzzer, HIGH); //Turn Buzzer on

}

void loop() { //Loop code

  digitalWrite(blueLED1, HIGH); //Blue led on
  delay(50); //wait for 1/25 of a second
  digitalWrite(blueLED1, LOW); //Blue led off
  digitalWrite(yellowLED2, HIGH); //Yellow led on
  delay(50); //wait for 1/25 of a second
  digitalWrite(yellowLED2, LOW); //Yellow led off
  digitalWrite(greenLED3, HIGH); //Green led on
  delay(50); //wait for 1/25 of a second
  digitalWrite(greenLED3, LOW); //Green led off
  digitalWrite(redLED4, HIGH); //Red led on
  delay(50); //wait for 1/25 of a second
  digitalWrite(redLED4, LOW); //Red led off
  digitalWrite(greenLED3, HIGH); //Green led on
  delay(50); //wait for 1/25 of a second
  digitalWrite(greenLED3, LOW); //Green led off
  digitalWrite(yellowLED2, HIGH); //Yellow led on
  delay(50); //wait for 1/25 of a second
  digitalWrite(yellowLED2, LOW); //Yellow led off
  
}

Credits

ShreyanR

ShreyanR

0 projects • 4 followers
adityan76

adityan76

0 projects • 2 followers

Comments