Hello.

I am finally got to seriously play with Arduino boards and want to control bank of 24 LEDs. Idea at the moment is to create a single wave of light. I thought I was on the right track, but results are not what I expected.

Here is my code snippet:

```
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();
}
}
}
```

There must be a simple solution for this and it just escapes me.

Any help is appreciated