From 061225f87ad07a82b81bf81cbc1c4c54f969daf0 Mon Sep 17 00:00:00 2001 From: jprodgers Date: Thu, 28 May 2015 18:27:22 +0200 Subject: [PATCH] Demo Mode Added This is a demo mode I use at conferences. Had to change a few things to work with the new library. --- .../Animations/LoLShield_Demo/LoLShield_Demo.ino | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/examples/Animations/LoLShield_Demo/LoLShield_Demo.ino b/examples/Animations/LoLShield_Demo/LoLShield_Demo.ino index b794b6a..71e9af7 100644 --- a/examples/Animations/LoLShield_Demo/LoLShield_Demo.ino +++ b/examples/Animations/LoLShield_Demo/LoLShield_Demo.ino @@ -5,12 +5,8 @@ int toggleState; int EEPROMaddress = 0; -int charLength[]={ - 20, 14, 23, 30}; -unsigned char text0[]="My eyes are up there"; -unsigned char text1[]="Blinky or GTFO"; -unsigned char text2[]="Enjoying the lightshow?"; -unsigned char text3[]="Would you like to play a game?"; +int charLength = 30; +unsigned char text[]="Would you like to play a game?"; byte brightness = 7; @@ -42,7 +38,7 @@ void loop(){ 1 Game of Life 2 "Would you like to play a game?" 3 Double Helix - 4 Basit test + */ switch(toggleState){ @@ -53,7 +49,7 @@ void loop(){ life(); break; case 2: - Myfont::Banner(charLength[3],text3); + Myfont::Banner(charLength,text); break; case 3: DNA(); @@ -335,7 +331,7 @@ void life(){ if (count == 3 && world[x][y][0] == 0) { // A new cell is born world[x][y][1] = 1; - LedSign::Set(x,y,1); + LedSign::Set(x,y,brightness); } else if ((count < 2 || count > 3) && world[x][y][0] == 1) { // Cell dies