8 x RGB LEDs Countdown Sequence

Hi there to anyone reading,

Just wondering if anyone could help me at all please???

What it is that I’m trying to do is have a circuit so that you press the button and all 8 RGB LEDs turn on red. Then in a sequence of 4 second intervals one LED at a time changes from red to green (like a clock type sequence). Then when they have all turned green (4 seconds x 8 lights = 32 seconds), they remain green for an extra 7 seconds before turning off.

I have all the kit and I can do the basics but this is seeming quite daunting! Thank you in advance for any help!

Cheers

but this is seeming quite daunting!

It IS daunting, but only because you don't have, or didn't provide, complete requirements.

How is the button sewn onto the Arduino? Wiring a switch would be much easier.

How are the LEDs connected to the Arduino? 8 RGB LEDs will require 24 pins. If you want to get all possible colors from the LEDs, you'll need for those 24 pins to all be PWM pins. So, which Arduino DO you have? Do you need more than red, green, and blue from the LEDs?

If you don't need ANYTHING else to happen during the 39 second "countdown", the state change detection example is good starting point. When the switch becomes pressed, turn all 8 pins on, delay for 4 seconds, turn one red pin off and a green pin on. Repeat 7 times. Then, delay for 7 seconds, and turn all 8 green pins off. Nothing will then happen until the switch becomes pressed again.

By putting the pin numbers in three arrays, for the red pins, the green pins, and the blue pins, you'd have about 20 to 30 lines of code.

Hi PaulS,

Thanks for the response! You're completely right, i didn't put all my requirements, my bad!

I only need green and red due to that the LEDs I have bought only have two pins. I have an arduino uno, with a breadboard that has 64 lines.

I was thinking about putting the button over the "middle gap" E to F on the breadboard.

Then using the arduino ports 9,10,11 as they are PWM. But I'm unsure how you can wire multiple LEDs through PWM via a breadboard? Is it attaching row 1 to row 2 to row 3 etc with overlapping connection wires?

Cheers
Ben

the LEDs I have bought only have two pins.

An LED with n pins has n-1 colors. A 4 pin LED has 3 colors. A 2 pin LED has one color.

I have an arduino uno, with a breadboard that has 64 lines.

The number of lines on the breadboard is irrelevant.

But I’m unsure how you can wire multiple LEDs through PWM via a breadboard?

If you want individual control over them, you can’t.

For informed help, do go and read the sticky and follow the instructions. Otherwise you're just wasting your (and our, which is actually much worse) time.