I built this 4x6 matrix/array found here:
http://www.instructables.com/id/Easy-4x6-LED-Matrix-Arduino/
It works fine, but I can't figure out how to do what I want it to do. I want it to do a random twinkling effect, where a random number of LEDs come on at any given time, not just come on but fade in and out. The idea is directly from this:
http://www.nerdkits.com/videos/ledheart/
The instructables project's random code only lets one LED come on at a time, and it comes on then goes off, doesn't fade in and out like I want.
I can't use the code from the heart project because not only is it in C, but it has 1 row and 20 columns as opposed to 4 rows and 6 columns on the instructables project. I just want to do the light effect, don't want the LCD screen on the heart.
I did find this which the person borrowed the code from the heart project to do the twinkling effect, but he doesn't have it set up like an array, he's got individual LEDs going to the arduino pins:
http://generalio.blogspot.com/2009/02/arduino-powered-led-roses.html
My ultimate goal is to do the twinkling effect like in the heart project, add a pot to control the speed (which I have managed to do with the 4x6 array code), and add a button so I can switch between different patterns (which I can probably figure out). I just can't figure out how to do the twinkling and add randomness to it. I'm looking for any help or suggestions, or if there is a better project than the instructables one which will let me do this. Thank you.