Hello hello everyone,
This is my very first Instructable. You may critisize me on the bad parts.
In this Instructable, I am going to show you my idea of some disco lights with Arduino.
Step 1: Materials Needed
These are the things you will need:
Arduino (Any Arduino will do, I used an Uno)
- 2 green LED's
- 2 blue LED's
- 2 yellow LED's
- 10 Jumper cables
- 4 220Ohm Resistors (Red, Red, Brown, Gold)
- 4 330Ohm Resitsors (Orange, Orange, Brown, Gold)
Step 2: Adding LED's and Resistors to Breadboard
I added the LED's the following way:
The 2 green and yellow LED's on the left side and the 2 red and blue LED's on the right.
Next, I added the 220Ohm resistors on the green and yellow LED's. and the 330Ohm resistors on the red and blue LED's.
Step 3: Wiring the LED's With the Arduino
Now you can connect the resistors with the Arduino using the jumper cables.
First thing I always do is connecting the ground. I used 2 jumper for that, I connected the first end of the jumper to the anodes of the LED's and the other end to the other rail of the breadboard.
Then I connected the LED's to the Arduino. The connections are as follows:
- Pin 12 to the first LED on the left
- Pin 11 to the second LED
- Pin 10 to the third LED
- And so on to pin 5 for the last LED.
Step 4: Coding Time!!
Now the fun part, writing the code.
I made 5 different patterns in a random order. The first pattern is just scanning from left to right, followed by three flashes of all LED's, then alternating between the LED's, followed by groups of four LED's alternating and lastly groups of two LED's alternating.
It was quite funny how I was thinking about the patterns I would use. I was listening to a concert about film music when this just popped into my head like nothing.
Step 5: Testing... and Done!
You are now ready to test this program. I have made a video which shows the patterns I chose.
You are welcome to write critics on my style, I'll try to adjust my style based on the critics.
For now, goodbye and...