Python code for controlling a lattice of LEDs with a Raspberry Pi B+