Randomly fade 25 LEDs
jeff-o
Posts: 181
Hi everyone,
I'm thinking of starting up a project that would randomly fade up to 25 LEDs on and off, like stars or fireflies. I'm sure you know what I mean. Since the propeller wouldn't really be doing anything else, it could control the LEDs directly. Or, I could use an LED driver chip (but that seems like overkill).
Has anyone done something like this before? Got any clever ideas on how to run 25 PWM channels?
My ideas so far:
- not all the LEDs would be active at the same time. Maximum 16, I'd say.
- a single timer could run two or more LEDs at once. The actual pins would fade on and off together, but which pins are fading could be randomly chosen each time.
- single colour would be fine, RGB would be spectacular
I'm thinking of starting up a project that would randomly fade up to 25 LEDs on and off, like stars or fireflies. I'm sure you know what I mean. Since the propeller wouldn't really be doing anything else, it could control the LEDs directly. Or, I could use an LED driver chip (but that seems like overkill).
Has anyone done something like this before? Got any clever ideas on how to run 25 PWM channels?
My ideas so far:
- not all the LEDs would be active at the same time. Maximum 16, I'd say.
- a single timer could run two or more LEDs at once. The actual pins would fade on and off together, but which pins are fading could be randomly chosen each time.
- single colour would be fine, RGB would be spectacular
Comments
I think there's an object that can do 30-something channels:
http://obex.parallax.com/objects/467/
Maybe this could help too, not sure:
http://obex.parallax.com/objects/437/
http://forums.parallax.com/showthread.php?113685-OBEX-update-PWM_32_v2&highlight=fireflies
I recently posted the schematic on the website.
Might give you some ideas...