For the last 2 years I've been getting in to making LED displays using Arduino. I get how to use the outputs as on/offs and literally have to write thousands (lots of copy/paste) of lines of code to do the sequences i want as i have been unable to understand how to multiplex or write more complex (and probably a lot shorter) code to do what i want. As an example, i have attached some pictures, and the code i used to make an Xmas tree last year. The strings of 'garland' LEDs on the tree turn on/off in order, at such a rate that it creates the marquee/moving light effect. there are some other patterns too, where like one string of green turns on, then the next and next, then same with the red and the white, then they will all stay on for a minute, turn off, and start all over. I would attach a video, but it doesn't appear i can.
The problems i'm running in to are, of course, qty of outputs and the code. For the xmas tree i used both a standard Arduino and an arduino Nano, the nano controls the star. Each row of lights on the tree are 3 circuits, one for red, one green, one white. 15 total circuits for the tree. the star is split in to 19 circuits. There have been times i wanted to be able to do other sequences, but run out of outputs, even using a Mega. Also, for running so many LEDs i have created 'switch boards' using 2n2222 transistors, to act as switches to draw power from a separate power supply. I included a picture of one that i just recently designed and had made by JLCPCB. The one in the tree is hand made.
My current project is to make a wreath with 1/8" plywood, which has green LEDs bordering the outside of the wreath and the inner hole, then have strings of LEDs acting as garland wrapping the wreath, similar to the garland look on the tree, and a big bow on top, i've also included pictures of the bow so far. In between the strings of garland LEDs i then plan on having some ornaments, which too have a series of LEDs, turning on/off in some sequences, each controlled by individual Nano's, as i would need upwards of 150 outputs to control everything with one controller and writing the simple on/off code that i know how to do would take forever trying to sequence so many different things at once.
Sorry this is such a long post. Does it make sense? does anyone have any suggestions as a better way to do what i want? it doesn't seem like anyone makes displays like these, so of all the searching I've done i can't find any example projects and/or codes to attempt to modify to work for me.
Do you need any more information?
Thank you all.
Example.ino (36.7 KB)