hi,
i'm intending to charlieplex 30 rgb led lights, common cathode. i am very new to this all and only bought an arduino (sunfounder clone of uno r3) about 1 month ago. i taught myself how to charlieplex regular led lights, and after pouring over schematics i found online, it seems to me that charlieplexing rgbs is confusing, but maybe not so much as i thought.
however, schematic drawings are still difficult for me to understand, as i am thinking in terms of wiring them up.
i have a written plan for how to wire my leds using 6 pins. here's a sample of the wiring for the first 12. Negative is cathode, and rgbs is to their respective pins:
(led) (-) ( r,g, b)
L1 1 2 ,3, 4
L2 2 3, 4, 5
L3 3 4, 5, 6
L4 4 5, 6, 1
L5 5 6, 1, 2
L6 6 1, 2, 3
L7 1 3, 4, 5
L8 2 4, 5, 6
L9 3 5, 6, 1
L10 4 1, 2, 3
L11 5 2, 3, 4
L12 6 3, 4, 5
I hope this makes sense.
my question is for Leds like L3 and L8, will there be any problem with turning them on separately? i've gotten myself a bit confused, and also dont have the parts to test it out so i wanted to ask before i start planning my build. i'm thinking since the cathode on any "matching" sets of rgb pins will be different, when i set that to input low, only the light i want will turn on.
for L3, would this work for example for turning on red light? with pins set as int, GO1, 2 etc.
pinMode( GO1, INPUT);
digitalWrite( GO1, LOW);
pinMode( GO2, INPUT);
digitalWrite( GO2, LOW);
pinMode( GO3, OUTPUT);
digitalWrite( GO3,HIGH);
pinMode( GO4, OUTPUT);
digitalWrite( GO4, LOW);
pinMode( GO5,OUTPUT);
digitalWrite( GO5, LOW);
pinMode( GO6,OUTPUT);
digitalWrite( GO6, LOW);
as you can see, this is already long and sort of messy. i am new to code as well so i am trying to understand what i will need to learn in order to simplify my code. i'm not sure the terminology, but i would like to set a state of led's being on (or at least delayed since it's charlieplexed) and then make patterns based off that set info.
also, how do i combat the problem of colormixing rgb's with charlieplexing?
the project i'm making is like a panel of led lights spaced apart (5 rows of 6) that will be inside a box under frosted plaskolite.
i basically want to create some light patterns using various colors. i think to make it less confusing to myself, if i just have all the leds cycle through the rainbow or a few colors back to white, it will be easier than trying to make them do different individual patterns the only difference will be the times each led turns on/off.
if anyone can direct me to tutorials or posts dealing with this directly (charliplexing rgb leds and/or cycling colors on rgb leds) or help me here, i'd greatly appreciate it.
also, anyone have advice for following schematics for wiring other than color-coding the lines?
apologies for the newbieness of my post. not sure if i should've posted in another section. i know i am probably taking on a lot as a beginner, however, i really want to make something i like, and i think this project will teach me a lot.
(as an aside, is it possible to wire 30 leds other than charlieplexing using only 1 uno r3 board? i've read a little about shift registers, but need to read more. ideally i would like to have all leds on as white from the onset, then have a pattern of various leds fading through colors at different times against the other still white leds.)
thanks for the help everyone.