Type int can hold -32768 to +32767.
1000000 is going to overflow on the convert and the math you do with length won't work as int.
Oh I forgot about that. ![]()
Is there a better way to specify the light on time without the loop I used which is very very unprecise.
Why not use a global array and pointer?
Again I am not quite sure but I think this is done automaticly(except the global array) but it might take some tipe to initialize the array each loop again.