Matrix problem

Ah. The arrow was supposed to point right, as it looks in the code. Change the LSBFIRST back to MSBFIRST and swap the highByte() and lowByte() functions.

What changed the LEDs to light up with a 1 is the "~" operator. It means "binary not" and reverses 0s & 1s.