In regards to the code
Code:
float in, out;
for (in = 0; in < pi * 2; in = in + pi/500)
{
for (int i = 0; i <= 23; i = i + 1)
{
if (in > pi * 2 * i / 24 )
{
out = ((cos((in - pi) - (i*(pi*2)/24))+1)/2) *4095;
tlc.setPWM(i, out);
tlc.write();
}
}
}
I don't think this does what you think it does.
Running it thru a spreadsheet, that
if (in > pi * 2 * i / 24 ) only is true for 1 of the 24 i loops, so re-sets the LED 1/24th of the time. Good practice is setting the LED each loop, even if it is off, because the LED will keep the previous number until changed.
When it does set the LED,
out is in a range from zero to the low 4000s. If these LEDs are typical, the range is zero (off) to 255 (full on). Plus if they are color, you have to set each Red-Green-Blue to a level -- typically something like
tlc.setPWM( i, color( outR,outG,outB ) );
Find the command in the examples; I'm just guessing what it is.