Snake game for a 5x5 LED matrix
Diff: ledCube.h
- Revision:
- 1:5fcb94bb03db
- Parent:
- 0:dc906408980e
- Child:
- 2:9c075a0a6d4e
--- a/ledCube.h Wed Oct 09 16:23:20 2013 +0000
+++ b/ledCube.h Thu Oct 17 04:32:58 2013 +0000
@@ -1,14 +1,24 @@
#include "mbed.h"
+#include "MCP23S17.h"
-class ledCube{
+#ifndef LEDCUBE_H
+#define LEDCUBE_H
+
+class ledCube
+{
public:
DigitalOut *ledArray[5][5];
+ SPI *spi;
+ MCP23S17 *chip;
int numRows, numCols;
ledCube();
- void lightLed(char row, char column, char layer);
- void drawHorLine(char startRow, char startCol, char endRow, char endCol);
+ void turnOnLed(char row, char column, char layer);
void turnOffLed(char row, char column, char layer);
-
+ void blink();
+
private:
DigitalOut *lastLedLit;
-};
\ No newline at end of file
+ int spiCurrentlyLit;
+};
+
+#endif //LEDCUBE_H
\ No newline at end of file