👨 make the CYBER move

This commit is contained in:
Felix Pankratz 2024-12-17 22:48:31 +01:00
parent ecab7bc90b
commit f44fd7ce81
3 changed files with 197 additions and 5 deletions

View File

@ -4,11 +4,23 @@
#include "cyber.h" #include "cyber.h"
#include "stalker111pt7b.h" #include "stalker111pt7b.h"
int default_x = 5;
int default_y = 22;
int offset = 0;
void draw_cyber(MatrixPanel_I2S_DMA *matrix, Mode mode) { void draw_cyber(MatrixPanel_I2S_DMA *matrix, Mode mode) {
matrix->fillScreenRGB888(255, 255, 0); matrix->fillScreenRGB888(255, 255, 0);
matrix->setFont(&stalker111pt7b); matrix->setFont(&stalker111pt7b);
matrix->setTextColor(matrix->color444(0, 0, 1)); matrix->setTextColor(matrix->color444(0, 0, 1));
matrix->setCursor(5, 22); if (mode == Stealth) {
matrix->print("CYBER"); matrix->setCursor(default_x, default_y);
; } else {
matrix->setCursor(default_x - offset, default_y);
offset++;
}
matrix->print("CYBER CYBER");
if (offset == 59) {
offset = 0;
}
} }

View File

@ -14,7 +14,7 @@
MatrixPanel_I2S_DMA *matrix = nullptr; MatrixPanel_I2S_DMA *matrix = nullptr;
Mode mode = HighVis; Mode mode = HighVis;
DisplayStyle style = Congress; DisplayStyle style = Supercomputer;
void setup(){ void setup(){
pinMode(ONBOARD_LED, OUTPUT); pinMode(ONBOARD_LED, OUTPUT);
@ -38,6 +38,7 @@ void setup(){
matrix->begin(); matrix->begin();
matrix->setBrightness8(64); matrix->setBrightness8(64);
matrix->fillScreenRGB888(0, 0, 0); matrix->fillScreenRGB888(0, 0, 0);
matrix->setTextWrap(false);
matrix->setFont(&Pilowlava_Regular8pt7b); matrix->setFont(&Pilowlava_Regular8pt7b);
} }
@ -65,6 +66,7 @@ void loop() {
switch(style) { switch(style) {
case Rain: case Rain:
style = Congress; style = Congress;
matrix->setFont(&Pilowlava_Regular8pt7b);
break; break;
case Congress: case Congress:
style = Supercomputer; style = Supercomputer;
@ -78,7 +80,7 @@ void loop() {
} }
while(!digitalRead(NEXT_BUTTON)); // Wait for release while(!digitalRead(NEXT_BUTTON)); // Wait for release
} }
switch(style) { switch(style) {
case Rain: case Rain:
draw_rain(matrix, mode); draw_rain(matrix, mode);

178
nametag/src/stalker19pt7b.h Normal file
View File

@ -0,0 +1,178 @@
const uint8_t stalker19pt7bBitmaps[] PROGMEM = {
0x00, 0xFF, 0xAA, 0x0F, 0xFF, 0xCF, 0x1A, 0x34, 0x60, 0x24, 0x48, 0x97,
0xF2, 0x44, 0xBF, 0x92, 0x24, 0x48, 0x10, 0x20, 0x47, 0xF8, 0x1F, 0xC0,
0x81, 0xFE, 0x20, 0x40, 0x80, 0xE0, 0xE0, 0xE2, 0x04, 0x08, 0x18, 0x10,
0x20, 0x40, 0x8E, 0x8E, 0x0E, 0x00, 0xFF, 0xED, 0x80, 0x2D, 0x49, 0x24,
0x99, 0x10, 0x89, 0x12, 0x49, 0x25, 0x40, 0x08, 0x08, 0x6B, 0x7C, 0x38,
0x38, 0x74, 0x92, 0x10, 0x10, 0x20, 0x47, 0xF1, 0x02, 0x04, 0x00, 0xFC,
0x92, 0x40, 0xFF, 0xFC, 0xFF, 0x80, 0x01, 0x02, 0x06, 0x04, 0x08, 0x18,
0x10, 0x20, 0x20, 0x40, 0xC0, 0x80, 0xFF, 0x06, 0x0C, 0x18, 0x30, 0x60,
0xC1, 0x83, 0x06, 0x0F, 0xF0, 0xF0, 0x20, 0x40, 0x81, 0x02, 0x04, 0x09,
0x12, 0x24, 0x4F, 0xF0, 0xFE, 0x04, 0x08, 0x10, 0x3F, 0xE0, 0x40, 0x81,
0x02, 0x07, 0xF0, 0xFF, 0x01, 0x01, 0x01, 0x01, 0x3E, 0x02, 0x01, 0x01,
0x01, 0x01, 0xFF, 0x81, 0x0A, 0x14, 0x28, 0x50, 0xBF, 0x82, 0x04, 0x08,
0x10, 0x7E, 0x81, 0x02, 0x04, 0x08, 0x1F, 0x81, 0x02, 0x06, 0x0F, 0xF0,
0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xFF, 0x81, 0x81, 0x81, 0xFF,
0xFF, 0x04, 0x08, 0x10, 0x20, 0x82, 0x08, 0x10, 0x20, 0x40, 0x80, 0x7C,
0x89, 0x12, 0x24, 0x5F, 0xE0, 0xC1, 0x83, 0x06, 0x0F, 0xF0, 0xFF, 0x81,
0x81, 0x81, 0xFF, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0xFF, 0x81,
0xFF, 0xEE, 0xE0, 0x0F, 0x11, 0x11, 0x02, 0x0C, 0x30, 0x60, 0x80, 0xC0,
0x30, 0x0C, 0x03, 0xFE, 0x00, 0x07, 0xF0, 0xC0, 0x30, 0x18, 0x06, 0x03,
0x02, 0x0C, 0x30, 0xC0, 0x04, 0x0A, 0x33, 0x67, 0xCE, 0x9C, 0x30, 0x20,
0x20, 0x00, 0x00, 0x40, 0x7E, 0xC1, 0x81, 0x01, 0x01, 0x79, 0x89, 0x89,
0x89, 0x89, 0x89, 0x7E, 0x18, 0x18, 0x18, 0x28, 0x24, 0x24, 0x44, 0x44,
0x7E, 0x42, 0x82, 0x81, 0xFE, 0x83, 0x81, 0x81, 0x81, 0x82, 0xFE, 0x83,
0x81, 0x81, 0x83, 0xFE, 0x1F, 0x20, 0x60, 0x40, 0xC0, 0x80, 0x80, 0xC0,
0x40, 0x60, 0x20, 0x1F, 0xF8, 0x24, 0x24, 0x22, 0x22, 0x21, 0x21, 0x22,
0x22, 0x24, 0x24, 0xF8, 0xFF, 0x02, 0x04, 0x08, 0x10, 0x3C, 0x40, 0x81,
0x02, 0x07, 0xF0, 0xFF, 0x02, 0x04, 0x0F, 0xD0, 0x20, 0x40, 0x81, 0x02,
0x04, 0x00, 0x1E, 0x40, 0x82, 0x08, 0x10, 0x20, 0x4F, 0x83, 0x06, 0x0B,
0xE0, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x7F, 0xC1, 0x83, 0x06, 0x0C, 0x10,
0xFE, 0x20, 0x40, 0x81, 0x02, 0x04, 0x08, 0x10, 0x20, 0x47, 0xF0, 0x04,
0x10, 0x41, 0x04, 0x10, 0x61, 0x86, 0x1C, 0xDE, 0x82, 0x84, 0x88, 0xB0,
0xE0, 0x80, 0x80, 0xC0, 0xB0, 0x98, 0x84, 0x83, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xFE, 0xC7, 0xE5, 0xE9, 0xB9,
0xB1, 0x91, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xC3, 0x86, 0x8D, 0x19,
0x32, 0x62, 0xC5, 0x87, 0x0E, 0x0C, 0x10, 0x38, 0x24, 0x44, 0x42, 0x82,
0x81, 0x81, 0x82, 0x42, 0x44, 0x24, 0x38, 0xFD, 0x06, 0x0C, 0x18, 0x30,
0x60, 0xFE, 0x81, 0x02, 0x04, 0x00, 0x06, 0x14, 0xCB, 0x1C, 0x30, 0x60,
0xC9, 0x9D, 0x12, 0x67, 0x30, 0xFF, 0x06, 0x0C, 0x1F, 0xF2, 0x22, 0x46,
0x85, 0x0E, 0x0C, 0x10, 0x7F, 0x06, 0x0A, 0x06, 0x04, 0x04, 0x04, 0x0D,
0x0F, 0x0B, 0xF0, 0xFF, 0x26, 0x48, 0x81, 0x02, 0x04, 0x08, 0x10, 0x20,
0x40, 0x80, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x06, 0x0B,
0xE0, 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x42, 0x64, 0x24, 0x38, 0x18,
0x10, 0x81, 0x81, 0x81, 0x81, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x7E, 0x83, 0x82, 0x44, 0x64, 0x28, 0x18, 0x10, 0x18, 0x2C, 0x24, 0x42,
0x82, 0x83, 0x06, 0x0A, 0x26, 0x87, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
0xFF, 0x04, 0x04, 0x08, 0x08, 0x10, 0x30, 0x20, 0x60, 0x40, 0x80, 0xFF,
0xFF, 0x42, 0x85, 0x0A, 0x14, 0x28, 0x50, 0xA1, 0x42, 0x87, 0xF0, 0x80,
0x80, 0x40, 0x60, 0x20, 0x10, 0x18, 0x08, 0x04, 0x06, 0x02, 0x01, 0xFE,
0x14, 0x28, 0x50, 0xA1, 0x42, 0x85, 0x0A, 0x14, 0x2F, 0xF0, 0x10, 0x38,
0x7C, 0x66, 0xC6, 0x83, 0xFF, 0xE0, 0xC6, 0x30, 0x3C, 0x04, 0x0B, 0xF8,
0x30, 0x61, 0xBD, 0x80, 0x80, 0x80, 0x80, 0xFE, 0xC1, 0x81, 0x81, 0x81,
0x81, 0xC1, 0xBE, 0x3E, 0x40, 0x80, 0x80, 0x80, 0xC0, 0x60, 0x3F, 0x02,
0x04, 0x08, 0x17, 0xF0, 0xE0, 0xC1, 0x83, 0x07, 0x1B, 0xD0, 0x7D, 0x06,
0x0C, 0x1F, 0xF0, 0x20, 0x3F, 0x1E, 0x40, 0x81, 0x0F, 0x84, 0x08, 0x10,
0x20, 0x40, 0x81, 0x00, 0x3D, 0xC3, 0x81, 0x81, 0x81, 0x81, 0x83, 0x7D,
0x01, 0x03, 0x7E, 0x81, 0x02, 0x04, 0x0B, 0xD8, 0x60, 0xC1, 0x83, 0x06,
0x0C, 0x10, 0x61, 0x80, 0x00, 0xF0, 0x41, 0x04, 0x10, 0x41, 0x1F, 0x0C,
0x30, 0x00, 0x7C, 0x10, 0x41, 0x04, 0x10, 0x41, 0x07, 0x17, 0x80, 0x81,
0x02, 0x04, 0x08, 0x53, 0x28, 0x70, 0xF1, 0x32, 0x14, 0x10, 0xF0, 0x41,
0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x3F, 0xFF, 0xD9, 0x91, 0x91, 0x91,
0x91, 0x91, 0x91, 0xBD, 0xC6, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x7D, 0x06,
0x0C, 0x18, 0x30, 0x60, 0xBE, 0xBC, 0xE6, 0xC1, 0x81, 0x81, 0x81, 0x81,
0xE2, 0xBC, 0x80, 0x80, 0x80, 0x7F, 0x0E, 0x0C, 0x18, 0x30, 0x61, 0xBD,
0x02, 0x04, 0x08, 0x06, 0xB9, 0xC1, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80,
0xFF, 0x05, 0x80, 0xE0, 0x20, 0x60, 0xFE, 0x20, 0x20, 0x20, 0xFE, 0x20,
0x20, 0x20, 0x20, 0x22, 0x22, 0x1E, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x63,
0xB9, 0x83, 0x06, 0x0A, 0x24, 0x45, 0x8A, 0x0C, 0x81, 0x81, 0x91, 0x91,
0x91, 0x99, 0x7E, 0x66, 0x46, 0xC8, 0xE0, 0xC1, 0x84, 0xB0, 0xC1, 0x83,
0x06, 0x0A, 0x26, 0x44, 0x8E, 0x0C, 0x08, 0x23, 0xC0, 0xFE, 0x02, 0x06,
0x0C, 0x18, 0x30, 0x40, 0xFF, 0x1F, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10,
0x10, 0x10, 0x10, 0x10, 0x1E, 0xFF, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1,
0x83, 0x06, 0x0C, 0x18, 0x3F, 0xC0, 0xF8, 0x08, 0x08, 0x08, 0x08, 0x0F,
0x08, 0x08, 0x08, 0x08, 0x08, 0x78, 0xC2, 0xFE };
const GFXglyph stalker19pt7bGlyphs[] PROGMEM = {
{ 0, 1, 1, 5, 0, 0 }, // 0x20 ' '
{ 1, 2, 12, 5, 3, -11 }, // 0x21 '!'
{ 4, 7, 5, 9, 1, -10 }, // 0x22 '"'
{ 9, 7, 10, 9, 1, -10 }, // 0x23 '#'
{ 18, 7, 12, 9, 2, -11 }, // 0x24 '$'
{ 29, 8, 12, 9, 1, -11 }, // 0x25 '%'
{ 41, 1, 1, 9, 0, 0 }, // 0x26 '&'
{ 42, 3, 6, 6, 3, -10 }, // 0x27 '''
{ 45, 3, 12, 6, 2, -11 }, // 0x28 '('
{ 50, 3, 12, 6, 2, -11 }, // 0x29 ')'
{ 55, 8, 9, 9, 1, -9 }, // 0x2A '*'
{ 64, 7, 7, 9, 1, -7 }, // 0x2B '+'
{ 71, 3, 6, 6, 3, -3 }, // 0x2C ','
{ 74, 7, 2, 9, 1, -5 }, // 0x2D '-'
{ 76, 3, 3, 6, 3, -3 }, // 0x2E '.'
{ 78, 8, 12, 9, 1, -11 }, // 0x2F '/'
{ 90, 7, 12, 9, 1, -11 }, // 0x30 '0'
{ 101, 7, 12, 9, 1, -11 }, // 0x31 '1'
{ 112, 7, 12, 9, 1, -11 }, // 0x32 '2'
{ 123, 8, 12, 9, 1, -11 }, // 0x33 '3'
{ 135, 7, 11, 9, 2, -10 }, // 0x34 '4'
{ 145, 7, 12, 9, 2, -11 }, // 0x35 '5'
{ 156, 8, 12, 9, 1, -11 }, // 0x36 '6'
{ 168, 7, 12, 9, 2, -11 }, // 0x37 '7'
{ 179, 7, 12, 9, 1, -11 }, // 0x38 '8'
{ 190, 8, 12, 9, 1, -11 }, // 0x39 '9'
{ 202, 3, 8, 6, 3, -8 }, // 0x3A ':'
{ 205, 4, 10, 6, 2, -7 }, // 0x3B ';'
{ 210, 8, 9, 9, 1, -9 }, // 0x3C '<'
{ 219, 7, 4, 9, 1, -7 }, // 0x3D '='
{ 223, 8, 9, 9, 1, -9 }, // 0x3E '>'
{ 232, 8, 12, 9, 1, -11 }, // 0x3F '?'
{ 244, 8, 12, 9, 1, -11 }, // 0x40 '@'
{ 256, 8, 12, 9, 1, -11 }, // 0x41 'A'
{ 268, 8, 12, 9, 1, -11 }, // 0x42 'B'
{ 280, 8, 12, 8, 1, -11 }, // 0x43 'C'
{ 292, 8, 12, 9, 1, -11 }, // 0x44 'D'
{ 304, 7, 12, 9, 1, -11 }, // 0x45 'E'
{ 315, 7, 12, 9, 2, -11 }, // 0x46 'F'
{ 326, 7, 12, 9, 1, -11 }, // 0x47 'G'
{ 337, 7, 12, 9, 1, -11 }, // 0x48 'H'
{ 348, 7, 12, 9, 2, -11 }, // 0x49 'I'
{ 359, 6, 12, 8, 2, -11 }, // 0x4A 'J'
{ 368, 8, 12, 9, 1, -11 }, // 0x4B 'K'
{ 380, 8, 12, 9, 1, -11 }, // 0x4C 'L'
{ 392, 8, 12, 9, 1, -11 }, // 0x4D 'M'
{ 404, 7, 12, 9, 1, -11 }, // 0x4E 'N'
{ 415, 8, 12, 9, 1, -11 }, // 0x4F 'O'
{ 427, 7, 12, 9, 1, -11 }, // 0x50 'P'
{ 438, 7, 12, 9, 1, -11 }, // 0x51 'Q'
{ 449, 7, 12, 9, 1, -11 }, // 0x52 'R'
{ 460, 7, 12, 9, 1, -11 }, // 0x53 'S'
{ 471, 7, 12, 8, 1, -11 }, // 0x54 'T'
{ 482, 7, 12, 9, 1, -11 }, // 0x55 'U'
{ 493, 8, 12, 9, 1, -11 }, // 0x56 'V'
{ 505, 8, 12, 9, 1, -11 }, // 0x57 'W'
{ 517, 8, 12, 9, 1, -11 }, // 0x58 'X'
{ 529, 7, 12, 9, 1, -11 }, // 0x59 'Y'
{ 540, 8, 12, 9, 1, -11 }, // 0x5A 'Z'
{ 552, 7, 12, 9, 1, -11 }, // 0x5B '['
{ 563, 8, 12, 9, 1, -11 }, // 0x5C '\'
{ 575, 7, 12, 9, 1, -11 }, // 0x5D ']'
{ 586, 8, 6, 9, 1, -7 }, // 0x5E '^'
{ 592, 11, 1, 11, 0, 2 }, // 0x5F '_'
{ 594, 4, 3, 6, 2, -11 }, // 0x60 '`'
{ 596, 7, 8, 9, 1, -7 }, // 0x61 'a'
{ 603, 8, 12, 9, 1, -11 }, // 0x62 'b'
{ 615, 8, 8, 8, 1, -7 }, // 0x63 'c'
{ 623, 7, 12, 9, 1, -11 }, // 0x64 'd'
{ 634, 7, 8, 9, 1, -7 }, // 0x65 'e'
{ 641, 7, 12, 8, 1, -11 }, // 0x66 'f'
{ 652, 8, 11, 9, 1, -7 }, // 0x67 'g'
{ 663, 7, 12, 9, 1, -11 }, // 0x68 'h'
{ 674, 6, 12, 8, 2, -11 }, // 0x69 'i'
{ 683, 6, 15, 8, 1, -11 }, // 0x6A 'j'
{ 695, 7, 12, 8, 1, -11 }, // 0x6B 'k'
{ 706, 6, 12, 7, 2, -11 }, // 0x6C 'l'
{ 715, 8, 8, 9, 1, -7 }, // 0x6D 'm'
{ 723, 7, 8, 9, 1, -7 }, // 0x6E 'n'
{ 730, 7, 8, 9, 1, -7 }, // 0x6F 'o'
{ 737, 8, 12, 9, 1, -8 }, // 0x70 'p'
{ 749, 7, 11, 9, 1, -7 }, // 0x71 'q'
{ 759, 8, 9, 9, 1, -8 }, // 0x72 'r'
{ 768, 7, 8, 9, 1, -7 }, // 0x73 's'
{ 775, 8, 11, 8, 1, -10 }, // 0x74 't'
{ 786, 7, 8, 9, 1, -7 }, // 0x75 'u'
{ 793, 7, 8, 9, 1, -7 }, // 0x76 'v'
{ 800, 8, 8, 9, 1, -7 }, // 0x77 'w'
{ 808, 7, 8, 9, 1, -7 }, // 0x78 'x'
{ 815, 7, 11, 9, 1, -7 }, // 0x79 'y'
{ 825, 8, 8, 9, 1, -7 }, // 0x7A 'z'
{ 833, 8, 12, 8, 1, -11 }, // 0x7B '{'
{ 845, 7, 14, 9, 1, -13 }, // 0x7C '|'
{ 858, 8, 12, 9, 1, -11 }, // 0x7D '}'
{ 870, 8, 2, 10, 2, -6 } }; // 0x7E '~'
const GFXfont stalker19pt7b PROGMEM = {
(uint8_t *)stalker19pt7bBitmaps,
(GFXglyph *)stalker19pt7bGlyphs,
0x20, 0x7E, 19 };
// Approx. 1544 bytes