I am trying to see if it is possible to convert my project to Charlieplexing. As you can see I have 6 pods of 4 LEDs coded to chase—24 LEDs total. In the current setup, I have 2 LEDs connected per pin to make it work, of course with each having a resistor. This is working perfectly, however, I would like FEWER wires and therefore am contemplating using Charlieplexing, but I do not know if it is feasible. I have so far Charlieplexed 4 and 6 LEDs, but I am unsure of how to proceed and if is possible to control the "6 pods of 4 LEDs" individually as in my current setup with Charlieplexing. Or, would Charlieplexing be over-complicating the project? I am open to alternate ways that will work and be less wires. ANY direction would be greatly appreciated and I am willing to learn.
Video of current setup:
Code of current setup:
//initializing a variable for digital pin 2 to 13
int led1 = 2;
int led2 = 3;
int led3 = 4;
int led4 = 5;
int led5 = 6;
int led6 = 7;
int led7 = 8;
int led8 = 9;
int led9 = 10;
int led10 = 11;
int led11 = 12;
int led12 = 13;
void setup() {
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
pinMode(led5, OUTPUT);
pinMode(led6, OUTPUT);
pinMode(led7, OUTPUT);
pinMode(led8, OUTPUT);
pinMode(led9, OUTPUT);
pinMode(led10, OUTPUT);
pinMode(led11, OUTPUT);
pinMode(led12, OUTPUT);
}
void loop() {
digitalWrite(led1, HIGH);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(75);
digitalWrite(led1, LOW);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
delay(75);
digitalWrite(led2, HIGH);
digitalWrite(led6, HIGH);
digitalWrite(led10, HIGH);
delay(75);
digitalWrite(led2, LOW);
digitalWrite(led6, LOW);
digitalWrite(led10, LOW);
delay(75);
digitalWrite(led3, HIGH);
digitalWrite(led7, HIGH);
digitalWrite(led11, HIGH);
delay(75);
digitalWrite(led3, LOW);
digitalWrite(led7, LOW);
digitalWrite(led11, LOW);
delay(75);
digitalWrite(led4, HIGH);
digitalWrite(led8, HIGH);
digitalWrite(led12, HIGH);
delay(75);
digitalWrite(led4, LOW);
digitalWrite(led8, LOW);
digitalWrite(led12, LOW);
delay(75);
}
Wokwi of current setup: