Introduction: LED COP LIGHTS USING ARDUINO!

Here's a video showing cop lights in action.

Step 1: Components Required

  1. Micro controller(I used arduino Uno)
  2. Breadboard
  3. Red LED's(Or any colour you like)
  4. Blue LED's
  5. Connecting wires

Thats all

Now lets start working :)

Step 2: Making the Connections

Here is a circuit diagram,its not necessary to explain this its self explanatory

The pin 11 of arduino is connected to the positive terminal of the Blue LED

pin 9 is connected to the positive terminal of Red LED

the grounds are kept common and are connected to the GND pin

Step 3: Uploading the Code

Here's the code you need to upload on the arduino

int ledDelay = 50; // delay by 50ms
int redPin = 9;

int bluePin = 11;

void setup()

{

pinMode(redPin, OUTPUT);

pinMode(bluePin, OUTPUT);

}

void loop()

{

digitalWrite(redPin, HIGH); // turn the red light on

delay(ledDelay); // wait 50 ms

digitalWrite(redPin, LOW); // turn the red light off

delay(ledDelay); // wait 50 ms

digitalWrite(redPin, HIGH); // turn the red light on

delay(ledDelay); // wait 50 ms

digitalWrite(redPin, LOW); // turn the red light off

delay(ledDelay); // wait 50 ms

digitalWrite(redPin, HIGH); // turn the red light on

delay(ledDelay); // wait 50 ms

digitalWrite(redPin,LOW); // turn the red light off

delay(ledDelay); // wait 50 ms

delay(100); // delay midpoint by 100ms

digitalWrite(bluePin, HIGH); // turn the blue light on

delay(ledDelay); // wait 50 ms

digitalWrite(bluePin, LOW); // turn the blue light off

delay(ledDelay); // wait 50 ms

digitalWrite(bluePin, HIGH); // turn the blue light on

delay(ledDelay); // wait 50 ms

digitalWrite(bluePin, LOW); // turn the blue light off

delay(ledDelay); // wait 50 ms

digitalWrite(bluePin, HIGH); // turn the blue light on

delay(ledDelay); // wait 50 ms

digitalWrite(bluePin, LOW); // turn the blue light off

delay(ledDelay); // wait 50 ms

}

Step 4: You Are Done!

Yes you are done enjoy!

Make It Glow! Contest

Participated in the
Make It Glow! Contest