hintonpa:
No takers?
My take on it is that you appear to have wired the LEDs up as a serpentine raster but your software does not compensate for this. But you say it works from the serial monitor so I am not sure if this is your real problem. The code is written in a bit of a turgid way, using lots of instructions where a simple loop would do.