Optimization of code for maximum speed, very specific project.

Okay, random mode, reading data from Vixen, zero cross detection and setting the powerDelay values all work as long as I set the prescaler to 8 and TIMER_CYCLE_COUNT to 100. However in Vixen mode the channels don't turn on until the channel values reach about 128 out of the 255 possible. I had a lot of really stupid bugs in there. Working on this stuff when I'm very tired has proven to be a bad choice, lol.

Now I just have to figure out why the light don't come on until around 128 and they don't seem to change intensity. Attached is the latest code.

XmasLightControllerForVixenSSRs.ino (54.7 KB)