Random Zero Results

For some ungodly reason, casting to float at the very beginning seems to have fixed it.

 set_rgb((float)analogRead(red_in)/1023 * i, 
               (float)analogRead(green_in)/1023 * i,
               (float)analogRead(blue_in)/1023 * i);

What i don't understand is why its all perfect, but then just randomly goes to zero. In my previous hyperterminal example, they were all just basically counting up to 1023 since the analog inputs were all set to max.
It just doesn't bode well in my mind.

I want to test it more to figure out whats going on, but its pretty late so i need to call it a night.

I think i originally wrote it similar to what you suggested halley, but i thought i should divide then multiply to stop the numbers getting too big. I generally like to work with ints (they are nice) but set_rgb fundamentally uses floats for scaling, so the float solution is probably simpler.

Thanks Grumpy Mike (as usual) and Halley for replying nice and quick to help me out!