Introduction: Arduino Based Disco Lights

Picture of Arduino Based Disco Lights

This tutorial demonstrate the basics of Arduino with using two led lights which blink sequentially.

Step 1: Parts Required

Picture of Parts Required

You will require the following parts :---

1) Arduino Uno ( You can use any version of Arduino )

2) 2 Led's

3)Breadboard

4) Breadboard Wires

5) Wire Stripper

Step 2: About Fixing Led's

Picture of About Fixing Led's

The Led operate at 3V DC. The led's can be easily drawn by Arduino board. It has to be remembered that the shorter leg of an led is - negative & longer led is + positive.

Fix the Led as shown in image.

Step 3: Connecting Led to BreadBoard

Picture of Connecting Led to BreadBoard

1) Connect the ground of Led's to GND Pin of Arduino.

2) Connect +ve of one Led to 12th Pin of Arduino.

3) Connect -ve of second Led to 11th Pin of Arduino

4) Connect the USB Cable from computer to Arduino

Step 4: Disco Light Program

Below is the code for running disco lights using Two Led's. Upload the code to Arduino :---

/*
Disco Lights Turns on 1st LED on for one second, then 2nd Led for one second, repeatedly.

*/

void setup() {

// initialize the digital pin as an output.

// Pin 12 & 11 have LED's+ connected.

pinMode(12, OUTPUT);

pinMode(11, OUTPUT);

}

void loop() {

digitalWrite(12, HIGH); // set the LED on 12th Pin on

digitalWrite(11, LOW); // set the LED on 11th Pin off

delay(1000); // wait for a second

digitalWrite(12, LOW ); // set the LED on 12th Pin off

digitalWrite(11, HIGH); // set the LED on 11th Pin on

delay(1000); // wait for a second

}

Step 5: I Am a Disco Dancer...

Picture of I Am a Disco Dancer...

Hurray !!!! The Disco lights have been started.

Comments

DenisonP (author)2016-09-28

Kudos..!! Working perfectly... Thanks foe sharing !!

ibenkos (author)2014-10-18

Smart idea! Thanks for shearig :)

BLR_RAVI (author)2014-09-22

goood start...hope to see more

MsSweetSatisfaction (author)2014-09-20

Perfect for any geek themed party! Thanks for sharing!

Thanks a lot for your appreciation :)

About This Instructable

5,452views

17favorites

License:

Bio: Hyperrobotix provides Robotics and Electronics solutions online.
More by hyperrobotix:Computer Controlled Home Lighting SystemDarkness SensorArduino Based Disco Lights
Add instructable to: