diff --git a/software/ijnimations/battery.ino b/software/ijnimations/battery.ino new file mode 100644 index 0000000..eadf7ca --- /dev/null +++ b/software/ijnimations/battery.ino @@ -0,0 +1,62 @@ +/* + battery animation by Einstein +*/ +int battery() { + byte animation1[8] = { + B00111100, B01000010, B01000010, B01000010, B01000010, B01000010, B01000010, B01111110 + }; + + byte animation2[8] = { + B00111100, B01000010, B01000010, B01000010, B01000010, B01000010, B01111110, B01111110 + }; + + byte animation3[8] = { + B00111100, B01000010, B01000010, B01000010, B01000010, B01111110, B01111110, B01111110 + }; + + byte animation4[8] = { + B00111100, B01000010, B01000010, B01000010, B01111110, B01111110, B01111110, B01111110 + }; + + byte animation5[8] = { + B00111100, B01000010, B01000010, B01111110, B01111110, B01111110, B01111110, B01111110 + }; + + byte animation6[8] = { + B00111100, B01000010, B01111110, B01111110, B01111110, B01111110, B01111110, B01111110 + }; + + byte animation7[8] = { + B00111100, B01111110, B01111110, B01111110, B01111110, B01111110, B01111110, B01111110 + }; + + bool skip = render(animation1, 500); + if (skip) { + return true; + } + skip = render(animation2, 500); + if (skip) { + return true; + } + skip = render(animation3, 500); + if (skip) { + return true; + } + skip = render(animation4, 500); + if (skip) { + return true; + } + skip = render(animation5, 500); + if (skip) { + return true; + } + skip = render(animation6, 500); + if (skip) { + return true; + } + skip = render(animation7, 500); + if (skip) { + return true; + } + return false; +} diff --git a/software/ijnimations/ijnimations.ino b/software/ijnimations/ijnimations.ino index 4b03c1f..1676942 100644 --- a/software/ijnimations/ijnimations.ino +++ b/software/ijnimations/ijnimations.ino @@ -17,11 +17,12 @@ LedControl lc=LedControl(20,5,21,1); int lowPin = 11; /* ground pin for the buton ;-) */ int buttonPin = 9; /* choose the input pin for the pushbutton */ -const int animations = 21; +const int animations = 23; int (*ijnimations[animations])() = { ijhacklogo, ghost, invader, heart, invadesquid, jumper, ijlogowink, heartbeat, eq, invaderagain, pong, snake, arrows, directions, - packman, diagonals, waterdrip, aliens, blockanim, pulse, tewdoodles + packman, diagonals, waterdrip, aliens, blockanim, pulse, tewdoodles, + battery,xmastree }; int lastButtonState = LOW; /* the previous reading from the input pin */ diff --git a/software/ijnimations/xmastree.ino b/software/ijnimations/xmastree.ino new file mode 100644 index 0000000..3e87776 --- /dev/null +++ b/software/ijnimations/xmastree.ino @@ -0,0 +1,39 @@ +/* + xmastree by Einstein +*/int xmastree() { + byte animation1[8] = { +B10011000,B00111100,B01111110,B11111111,B00111100,B01111110,B11111111,B00011000 +}; + + byte animation2[8] = { +B00011001,B00111100,B01111110,B11111111,B00111100,B01111110,B11111111,B00011000 + }; + + byte animation3[8] = { +B01011000,B00111100,B01111110,B11111111,B00111100,B01111110,B11111111,B00011000 + }; + + + byte animation4[8] = { +B00011010,B00111100,B01111110,B11111111,B00111100,B01111110,B11111111,B00011000 + }; + + + bool skip = render(animation1, 500); + if (skip) { + return true; + } + skip = render(animation2, 500); + if (skip) { + return true; + } + skip = render(animation3, 500); + if (skip) { + return true; + } + skip = render(animation4, 500); + if (skip) { + return true; + } + return false; +}