I am still waiting for ws2812b LEDs, but after a bit of a break and then practicing on direct PWM pins, I finally cleaned up logic enough for it to do almost what I want. Here is what I got so far:
PHP Code:
void loop() {
float in, out, temp;
int i;
for (in = -pi; in < pi * 24; in = in + pi / 50)
{
for (i = 0; i <= 23; i = i + 1)
{
temp = 2 * pi / LED_Group * i;
if (in >= -pi + temp && in <= pi + temp )
{
out = cos(in - temp) * 2048 + 2047;
tlc.setPWM(i, out);
tlc.write();
}
}
}
}
LED_Group is for controlling how many LED to include in a wave