I am currently working on some Halloween lights to give a variety of different flash patterns and effects. I have a small cluster of LED in each device and each LED in the clusters is individually controlled. Its setup on the PWM outputs and programmed with the trueRadom to provide the flicker effect. All works perfectly fine with this and using multiple clusters in multiple decorations isnt a problem. it is setup to where Device1-LED1, Device2-LED1, Device3-LED1 are on the same PWM pin, Device1-LED2, Device2-LED2, Device3-LEd2 are on another PWM pin....and so on and so forth for each LED in the clusters.
My problem now is this....
I want to expand the capabilities and add other flash patterns and effects to the whole project. I would like for Device1, Device2, Device3 to be able to do different chase patterns and alternating patterns with each other. My thought with how to do that would be to be able to enable and disable separate grounds for each device that way each device will come on and off as a whole instead of have the same LED number for each device come on at the same time.
Is there a way to be able to use the I/O pins as grounds and be able to essentially connect and disconnect grounds for each cluster? or maybe a way to use transisitors as ground switches that the programming and enable and disable to provide with these different patterns? I've heard something about pullup and pulldown but not sure how they really work or if that about be an option too.