/ Trinket_Gemma_Space_Invader_Pendant / anim.h
anim.h
1 // SPDX-FileCopyrightText: 2018 Mikey Sklar for Adafruit Industries 2 // 3 // SPDX-License-Identifier: MIT 4 5 // Animation data for Trinket/Gemma + LED matrix backpack jewelry. 6 // Edit this file to change the animation; it's unlikely you'll need 7 // to edit the source code. 8 9 #define REPS 3 // Number of times to repeat the animation loop (1-255) 10 11 const uint8_t PROGMEM anim[] = { 12 13 // Animation bitmaps. Each frame of animation MUST contain 14 // 8 lines of graphics data (there is no error checking for 15 // length). Each line should be prefixed with the letter 'B', 16 // followed by exactly 8 binary digits (0 or 1), no more, 17 // no less (again, no error checking). '0' represents an 18 // 'off' pixel, '1' an 'on' pixel. End line with a comma. 19 B00011000, // This is the first frame for alien #1 20 B00111100, // If you squint you can kind of see the 21 B01111110, // image in the 0's and 1's. 22 B11011011, 23 B11111111, 24 B00100100, 25 B01011010, 26 B10100101, 27 // The 9th line (required) is the time to display this frame, 28 // in 1/100ths of a second (e.g. 100 = 1 sec, 25 = 1/4 sec, 29 // etc.). Range is 0 (no delay) to 255 (2.55 seconds). If 30 // longer delays are needed, make duplicate frames. 31 25, // 0.25 seconds 32 33 B00011000, // This is the second frame for alien #1 34 B00111100, 35 B01111110, 36 B11011011, 37 B11111111, 38 B00100100, 39 B01011010, 40 B01000010, 41 25, // 0.25 second delay 42 43 // Frames 3 & 4 for alien #1 are duplicates of frames 1 & 2. 44 // Rather than list them 'the tall way' again, the lines are merged here... 45 B00011000, B00111100, B01111110, B11011011, B11111111, B00100100, B01011010, B10100101, 25, 46 B00011000, B00111100, B01111110, B11011011, B11111111, B00100100, B01011010, B01000010, 25, 47 48 B00000000, // First frame for alien #2 49 B00111100, 50 B01111110, 51 B11011011, 52 B11011011, 53 B01111110, 54 B00100100, 55 B11000011, 56 25, // 0.25 second delay 57 58 B00111100, // Second frame for alien #2 59 B01111110, 60 B11011011, 61 B11011011, 62 B01111110, 63 B00100100, 64 B00100100, 65 B00100100, 66 25, 67 68 // Frames 3 & 4 for alien #2 are duplicates of frames 1 & 2 69 B00000000, B00111100, B01111110, B11011011, B11011011, B01111110, B00100100, B11000011, 25, 70 B00111100, B01111110, B11011011, B11011011, B01111110, B00100100, B00100100, B00100100, 25, 71 72 B00100100, // First frame for alien #3 73 B00100100, 74 B01111110, 75 B11011011, 76 B11111111, 77 B11111111, 78 B10100101, 79 B00100100, 80 25, 81 82 B00100100, // Second frame for alien #3 83 B10100101, 84 B11111111, 85 B11011011, 86 B11111111, 87 B01111110, 88 B00100100, 89 B01000010, 90 25, 91 92 // Frames are duplicated as with prior aliens 93 B00100100, B00100100, B01111110, B11011011, B11111111, B11111111, B10100101, B00100100, 25, 94 B00100100, B10100101, B11111111, B11011011, B11111111, B01111110, B00100100, B01000010, 25, 95 96 B00111100, // First frame for alien #4 97 B01111110, 98 B00110011, 99 B01111110, 100 B00111100, 101 B00000000, 102 B00001000, 103 B00000000, 104 12, // ~1/8 second delay 105 106 B00111100, // Second frame for alien #4 107 B01111110, 108 B10011001, 109 B01111110, 110 B00111100, 111 B00000000, 112 B00001000, 113 B00001000, 114 12, 115 116 B00111100, // Third frame for alien #4 (NOT a repeat of frame 1) 117 B01111110, 118 B11001100, 119 B01111110, 120 B00111100, 121 B00000000, 122 B00000000, 123 B00001000, 124 12, 125 126 B00111100, // Fourth frame for alien #4 (NOT a repeat of frame 2) 127 B01111110, 128 B01100110, 129 B01111110, 130 B00111100, 131 B00000000, 132 B00000000, 133 B00000000, 134 12, 135 136 // Frames 5-8 are duplicates of 1-4, lines merged for brevity 137 B00111100, B01111110, B00110011, B01111110, B00111100, B00000000, B00001000, B00000000, 12, 138 B00111100, B01111110, B10011001, B01111110, B00111100, B00000000, B00001000, B00001000, 12, 139 B00111100, B01111110, B11001100, B01111110, B00111100, B00000000, B00000000, B00001000, 12, 140 B00111100, B01111110, B01100110, B01111110, B00111100, B00000000, B00000000, B00000000, 12, 141 };