summaryrefslogtreecommitdiffstats
path: root/Matrix-3x3
diff options
context:
space:
mode:
authorAlexander Kauerz <kauerz@informatik.uni-luebeck.de>2011-11-04 00:23:50 +0100
committerAlexander Kauerz <kauerz@informatik.uni-luebeck.de>2011-11-04 00:23:50 +0100
commit184d9fb656b75534b5a4173f437db30d36e21b67 (patch)
tree0e9b01e9a11b9946f6602b73677b38b12d16fa30 /Matrix-3x3
parent38759c6174617657ece84a6061cad36521ea5d0a (diff)
downloadledmatrix-184d9fb656b75534b5a4173f437db30d36e21b67.tar
ledmatrix-184d9fb656b75534b5a4173f437db30d36e21b67.zip
Quelltestdateien wurden mundfein gemacht.
Diffstat (limited to 'Matrix-3x3')
-rw-r--r--Matrix-3x3/Matrix-3x3.pde57
1 files changed, 0 insertions, 57 deletions
diff --git a/Matrix-3x3/Matrix-3x3.pde b/Matrix-3x3/Matrix-3x3.pde
deleted file mode 100644
index eea52e5..0000000
--- a/Matrix-3x3/Matrix-3x3.pde
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- Blink
-
- */
-#define ROW 3
-#define COL 0
-#define ROWCNT 3
-#define COLCNT 3
-
-#define DELAY 3
-
-int frame[3][3] = {
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
-};
-
-int framenr = 0;
-int rownr = 0;
-void setup() {
- // initialize the digital pin as an output.
- int i;
- for (i = 0;i < ROWCNT; i++)
- pinMode(ROW + i, OUTPUT);
- for (i = 0;i < COLCNT; i++)
- pinMode(COL + i, OUTPUT);
-}
-
-void nextFrame() {
- frame[0][0] = (framenr % 100) < 50;
- frame[0][1] = (framenr % 100) < 50;
- frame[0][2] = (framenr % 100) < 50;
- frame[1][0] = (framenr % 100) < 50;
- frame[1][1] = (framenr % 100) >= 50;
- frame[1][2] = (framenr % 100) < 50;
- frame[2][0] = (framenr % 100) < 50;
- frame[2][1] = (framenr % 100) < 50;
- frame[2][2] = (framenr % 100) < 50;
-}
-
-void loop() {
- int i;
-
- rownr = ( rownr + 1 ) % ROWCNT;
-
- if (rownr == 0) {
- framenr++;
- nextFrame();
- }
-
- for (i = 0; i < COLCNT; i++) {
- digitalWrite(COL + i, frame[rownr][i]);
- }
- digitalWrite(ROW + rownr, HIGH);
- delay(DELAY);
- digitalWrite(ROW + rownr, LOW);
-}