Prajan07
Published © GPL3+

Decorative color light

This project does a specific action using LEDs to produce a colourful and decorative work. The hardware part is much easy here

BeginnerFull instructions provided941
Decorative color light

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Breadboard (generic)
Breadboard (generic)
×1
5 mm LED: Red
5 mm LED: Red
×1
5 mm LED: Yellow
5 mm LED: Yellow
×1
5 mm LED: Green
5 mm LED: Green
×1
High Brightness LED, White
High Brightness LED, White
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Decorative light

Code

Decorative light coding

C/C++
const int whitePin = 8;
const int redPin = 10;
const int yellowPin = 11;
const int greenPin = 12;

void setup() {
  // put your setup code here, to run once:
pinMode(whitePin, OUTPUT);
pinMode(redPin, OUTPUT);
pinMode(yellowPin, OUTPUT);
pinMode(greenPin, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(whitePin, HIGH);
delay(50);
digitalWrite(redPin, HIGH);
digitalWrite(whitePin, LOW);
delay(50);
digitalWrite(yellowPin, HIGH);
digitalWrite(redPin, LOW);                                                                                                  
delay(50);
digitalWrite(greenPin, HIGH);
digitalWrite(yellowPin, LOW);
delay(50);
digitalWrite(greenPin, LOW);
delay(50);
digitalWrite(yellowPin, HIGH);
digitalWrite(greenPin, LOW);
delay(50);
digitalWrite(redPin, HIGH);
digitalWrite(yellowPin, LOW);
delay(50);
digitalWrite(bluePin, HIGH);
digitalWrite(redPin, LOW);
delay(50);
digitalWrite(whitePin, HIGH);
digitalWrite(bluePin, LOW);
}

Credits

Prajan07
0 projects • 0 followers

Comments