Snake game for a 5x5 LED matrix

Dependencies:   MCP23S17 mbed

Committer:
dhamilton31
Date:
Thu Oct 17 22:09:22 2013 +0000
Revision:
2:9c075a0a6d4e
Parent:
1:5fcb94bb03db
Changed one stupid thing (cube) to (*cube) and it worked :P

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dhamilton31 0:dc906408980e 1 #include "mbed.h"
dhamilton31 1:5fcb94bb03db 2 #include "MCP23S17.h"
dhamilton31 0:dc906408980e 3
dhamilton31 1:5fcb94bb03db 4 #ifndef LEDCUBE_H
dhamilton31 1:5fcb94bb03db 5 #define LEDCUBE_H
dhamilton31 2:9c075a0a6d4e 6 /*
dhamilton31 2:9c075a0a6d4e 7 Class to represent the LED cube as a whole. Can light and select LEDs
dhamilton31 2:9c075a0a6d4e 8 */
dhamilton31 1:5fcb94bb03db 9 class ledCube
dhamilton31 1:5fcb94bb03db 10 {
dhamilton31 0:dc906408980e 11 public:
dhamilton31 0:dc906408980e 12 DigitalOut *ledArray[5][5];
dhamilton31 1:5fcb94bb03db 13 SPI *spi;
dhamilton31 1:5fcb94bb03db 14 MCP23S17 *chip;
dhamilton31 0:dc906408980e 15 int numRows, numCols;
dhamilton31 0:dc906408980e 16 ledCube();
dhamilton31 1:5fcb94bb03db 17 void turnOnLed(char row, char column, char layer);
dhamilton31 0:dc906408980e 18 void turnOffLed(char row, char column, char layer);
dhamilton31 1:5fcb94bb03db 19 void blink();
dhamilton31 2:9c075a0a6d4e 20 unsigned char spiCurrentlyLit;
dhamilton31 1:5fcb94bb03db 21
dhamilton31 0:dc906408980e 22 private:
dhamilton31 0:dc906408980e 23 DigitalOut *lastLedLit;
dhamilton31 1:5fcb94bb03db 24 };
dhamilton31 1:5fcb94bb03db 25
dhamilton31 1:5fcb94bb03db 26 #endif //LEDCUBE_H