Confused with charlieplexing


So I thought that I understood charlieplexing as I've done it before, along time ago. I decided to come back to it and I needed help so I sought it out. My search brought me here and their code is here

Now i'm confused because i have 2 leds wired up like in their first picture and i'm using their code, even though its for more leds. What I'm confused about is that both of them turn on even though they are both connected to the same pins. I'm confused how that works. Both pins are High and Low at the same time? That sounds super absurd.

The sequence it goes is both turn on, then a pause, then one goes on then off and then the other goes on and off.

Any help?

Could be reversing frequently (multiplexing) to make it look like both were on.

Could be you have both LEDs facing the same way. Try hooking the circuit between Gnd and +5. One of the two should light. When you reverse the connections the other should light. If that works then your hardware is fine.

No, they are oriented properly. I tried to understand what was going on by looking at the code but I got confused at

void display( int frame[4], int duration )
  int times = 0;
  int x = 0;
  int y = 0;

  while( times < duration )

  for( y = 0; y < 4; y++ )  
    for( x = 0; x < 3; x++ )
      if( frame[y] & (0b100 >> x) )
        light( c[y][x] );


mainly the light( c[y] ); What is the “c” for?

c is a 2-dimensional array indexed by x and y. Is suspect it encodes the pin numbers for the rows and columns of the matrix. It’s probably defined somewhere in the parts you don’t show.

Oh oh oh oh, it is. Its the sequence of pins being used.