summaryrefslogtreecommitdiffstats
path: root/Matrix_5x6
diff options
context:
space:
mode:
Diffstat (limited to 'Matrix_5x6')
-rw-r--r--Matrix_5x6/Charlie/Charlie.pde19
1 files changed, 13 insertions, 6 deletions
diff --git a/Matrix_5x6/Charlie/Charlie.pde b/Matrix_5x6/Charlie/Charlie.pde
index d863a03..fa7f4a0 100644
--- a/Matrix_5x6/Charlie/Charlie.pde
+++ b/Matrix_5x6/Charlie/Charlie.pde
@@ -1,5 +1,11 @@
#include <Charlieplex.h>
+/* TODO:
+ * Laufschrift
+ * Ameise
+ * Game of Life
+ */
+
#define NUMBER_OF_PINS 6
byte pins[] = {2,3,4,5,6,7};
Charlieplex charlieplex = Charlieplex(pins,NUMBER_OF_PINS);
@@ -118,10 +124,13 @@ void schnecke(int s) {
break;
}
+ int i;
+ i = 0;
while (1) {
+ i++;
if (scr[x][y]) break;
- scr[x][y] = 20;
+ scr[x][y] = w?20:i+5;
drawscr(2);
fadescr_down();
@@ -139,7 +148,8 @@ void schnecke(int s) {
case 3: y--; break;
}
}
- int i = 20;
+
+ i = 20;
while(i--) {
fadescr_down();
drawscr(2);
@@ -149,8 +159,5 @@ void schnecke(int s) {
void loop() {
// zufall_fading_up();
// zufall_fading_down();
- schnecke(0);
- schnecke(1);
- schnecke(2);
- schnecke(3);
+ schnecke(random(4));
}