Im working on a project right now and while I'm waiting for all my power pnp transistors to arrive I've made a mockup and I'm working on the programming. I've written my own beat detection algorithm that works pretty well and doesn't need to be hooked up to a computer and I've been working on all of the preprogrammed effects. The main problem is just the sheer amount of code that I have to write to get a good library of effects and I'm starting to run out of ideas so any advice or code would be appreciated.
Heres a link to a similar project: http://www.youtube.com/watch?v=-zSNv6FUjR8
My plan is to hook up digital pins 2-8 and 12-13 to the PNP transistors to turn individual LEDs on and off (common anode 3 watt stars from dealextreme) and PWM pins 9-11 to 3 power NPN transistors to control the color for all of the LEDs. I know that that means I cant have individual LEDs be different colors but I'm ok with that. This setup means that to turn one led first you choose your color from the 3 PWM pins and then you choose which one you want on from the other pins.
I plan to have 5 potentiometers on the analog inputs and the last one will be my audio input. Two of them are for mode selection, I divide the analog inputs by 200 to get it from 0-5 and then I have 2 switch statements that allow for 36 different modes to be selected. On the tx and rx pins I want to have two toggle switches for whatever purposes I can think of while writing more preset programs. Probably one of them will be to break from whatever program its doing and look at my mode selection potentiometers to see what to do next.
I have an array for both color and individual LEDs. The color array is called colorArray and the other one is called pinArray. I use arrays for 3 reasons, first of all for the random color of strobe effects so I can just use digitalWrite(random(9), HIGH) or analogWrite(random(3),255). Also it makes things that move side to side or in a pattern like the knight rider effect much easier and lastly it means I have way less variables to deal with.
Knowing all that any ideas or code for effects that would be cool with my setup would be awesome. The potentiometers can be used as delay time or sensitivity or other things that you might want to change in the code rather than presets just by the way.