LED Blinder

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.

I feel a shift register could take this project to the next level. You will be able to address individual LEDs with one as well.

Good luck, maybe try to make something a little less intense? Something like selecting a random two or three LEDs and fading them in and out?

Something like this quickie little thing I made…

   for (int i=Random; i <= Random + 50; i++){
      analogWrite(9, i);
      delay(50);
   } 
      for (int i=Random = 50; i <= Random - 100; i--){
      analogWrite(9, i);
      delay(50);
   } 
   Random = random(254);

Thanks for the advice and code

I think I understand the principal behind shift registers but I'm not sure what the wiring or code would look like. I've written quite a few effects already. I have the knight rider effect with a bunch of variations of that, I have a random strobe effect that you can choose the number of pixels you want lit up. I've got smooth color changers and a bunch of variations. Also I have the beat detection bit running very well with some cool effects using that. I'm getting pretty good with this language and am getting into the more complex functions. My background writing for fun with basic is helping understand the inner workings quite a bit.

Your chases loor really amazing! Maybe you should submit that video to a company like American DJ as a Video-resume of sorts. I doubt they're actively looking for programmers but you never know.

Any chance you could link to the specific DX LED stars you used?

lilpunk1302: Your chases loor really amazing! Maybe you should submit that video to a company like American DJ as a Video-resume of sorts. I doubt they're actively looking for programmers but you never know.

Any chance you could link to the specific DX LED stars you used?

He said that the video isn't from his project, it is someone else. Searching for "3W star rgb" in dealextreme, gives this result ;): http://www.dealextreme.com/p/3w-led-emitter-on-star-multicolored-rgb-4530