7.5 LED Matrix Driver and Snake Game Algorithm

All the LEDs on the QT2 Xplained Pro board are driven by the LED Matrix driver (IS31FL3728), which is controlled by the I2C. For detailed instructions on how to interface the LED matrix driver, refer to the driver device data sheet at http://www.issi.com/. A suitable I2C-based driver is implemented for the snake game demo. The led driver related code routines are available in the LEDdriver.c file.

A modular code is written for the snake game algorithm to demonstrate the capabilities of the touch surface. The snake algorithm related code routines are available in the Snake.c file. Figure 7-3 depicts the application flow for the snake game algorithm.

Figure 7-3. Snake Algorithm Flow Diagram