RGB LED Life Bar, 10 Sections, Individual LED Control, Arduino

Okay, I want to make a "Life Bar" using an arduino controller, 10 RGB leds, and a clear plastic box with ten sections.

I'm going to mount this on a wall in my room.
Each section will be diffused or frosted and will be 4 x 4 x 4.
One RGB LED will in the "back" of the section, with the wiring, coming out of the back of each section.
The controller will be to the left side of the total ten sections, with the USB port having easy access.
I think I'm going to have one switch to control the modes of the LED and cycle through each mode, which would reset after the lowest
"health" of the bar is reached; RED BLINKING >> Press Switch >> FULL HEALTH.

I'd like to control each LED individually so I can create a diminishing "Life Bar."

Like this:

(Colors of the LEDS)

OFF = No Color, LED not LIT
BLU = Blue
AQU = Aqua
GRN = Green
YEL = Yellow
RED = Red
REDB = RED Blinking

So:

Phase One (Full Health. HAHAHAHA I'M INVINCIBLE.)
|BLU|BLU|BLU|BLU|BLU|BLU|BLU|BLU|BLU|BLU|

Phase Two (I tripped whilst fighting.)
|OFF|BLU|BLU|BLU|BLU|BLU|BLU|BLU|BLU|BLU|

Phase Three (I'm hurt a little, but I'll be okay.)
|OFF|OFF|AQU|AQU|AQU|AQU|AQU|AQU|AQU|AQU|

Phase Four (I should probably start looking to see if there are any potions around.)
|OFF|OFF|OFF|AQU|AQU|AQU|AQU|AQU|AQU|AQU|

Phase Five (Green? Green is good.. Right?)
|OFF|OFF|OFF|OFF|GRN|GRN|GRN|GRN|GRN|GRN|

Phase Six (It's okay I've fought this boss before at much less health.)
|OFF|OFF|OFF|OFF|OFF|GRN|GRN|GRN|GRN|GRN|

Phase Seven (This boss... This boss can breathe fire now..?)
|OFF|OFF|OFF|OFF|OFF|OFF|YEL|YEL|YEL|YEL|

Phase Eight ('Tis but a Scratch!)
|OFF|OFF|OFF|OFF|OFF|OFF|OFF|YEL|YEL|YEL|

Phase Nine (HEALS HEALS HEALS HEALS PLEASE PLEASE ANYONE.)
|OFF|OFF|OFF|OFF|OFF|OFF|OFF|OFF|RED|RED|

Phase Ten (Okay, I have almost no health, my party is dead, and my strongest attack: Let's do this.)
|OFF|OFF|OFF|OFF|OFF|OFF|OFF|OFF|OFF|REDB|

Basically, every press of the switch would idealy cause the lifebar to cycle through these phases, after the lowest health, it would cycle back to the beginning, full health status.

The actual box will be DC powered, because I want it to be as seamless as possible with no wires showing.

The answers that I am looking for :

What would be the best controller for this application?
Any helpful hints on where I could look for something relatively similar for programming this?

I know that I am asking a lot, I am pretty much new to arduino programming and every howto or tutorial I've found talks of controlling all the LEDS together, I'm not sure if that would apply here since I have so many "phases" if you can shed any light on how to approach this, I would be eternally grateful and would totally fight dragons with you any time.

Thanks!

iceng3 years ago

To provide a circuit for you need to specify some things.

Where do you want to place the health switch ?

Are you using common Anode RGB LEDs or common Cathode ones ?

noctisEQ (author)  iceng3 years ago

Sorry I should have put that in the picture thing above!

Being a 4 x 4 x 4 cube, I think it would be best to run it common anode, so it would look like this :

|SWTCH|LED|LED|LED|LED|LED|LED|LED|LED|LED|LED|

I think this switch will only control the cycle of the "Phases" and I will put a toggle with it to act as an on and off switch.

Again, thanks for any help you can provide!

Jayefuu3 years ago

Have you seen these?

http://www.adafruit.com/products/1426

noctisEQ (author)  Jayefuu3 years ago

I'm not sure that will address my problem, they are cool though and I might try them for something else later, totally bookmarked! Thanks!