LED's

I recently came into acquisition of hundreds of LED's. Don't ask how.

(old washing machines... each had almost 50 led's)

Anyway, i'll tell you how. I do urban exploration a lot and find abandoned things, and take them; using them to build thing. Basically, I spent all yesterday carefully de-soldering almost 200 LED's. I also have like, 100 or so pushbuttons- though I dunno how many are good. As well as a plethora of resistors, transistors, and about a half dozen 120V-30A relays.

I want to build some sort of electronic sculpture that responds to it's audio surroundings by lighting up the LED's- more the louder it gets.

I've been studying charlieplexing and think I vaguely understand it.

Where do I start along the lines of code? Does anything like this already exist?

"urban exploration" , That's a good one, I'll have to remember that Euphemism. :wink:

Well your application idea sounds like it's in the early conception stage. You might want to spend time searching on what others have done. Early on you have to do a rough count on the number of inputs and outputs your project will require and what kind of actions you want to have. On/off lights, or buzzers are easy, scanning lights are not much harder. Detecting sound is not too difficult but would need some bread-boarding experimentation.

Your best bet is to breadboard individual functions and test how well they work before trying to tie all the functions together. It should be easy to get help around here for specific individual problems but kind of hard to ask to have a whole concept defined for you.

good luck

Lefty

"Euphemism" Yep that's what I meant, but the spell checker only gave me one choice, so what the hell. :wink:

Charlieplexing is just turning turning pins on or off to control individual LEDs. so just use digitalWrite() to flip pins.

Also remember that you can control brightness by strobing LEDs Easiest way is digitalWriting 1 and 0 faster than 20ms increments (any more than that and the LEDs will flicker or blink). Also the pusle width matters so

loop(){
digitalWrite(pin, 1);
delay(5);
digitalWrite(pin, 0);
delay(15); }

would be about 1/2 as bright as

loop(){
digitalWrite(pin, 1);
delay(10);
digitalWrite(pin, 0);
delay(10); }

because the PW is 25/75 (for the first example) vs 50/50 for the second