From cd601b4bfdd1987ac526e4fe59cd5ed25db1b2fa Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sun, 17 Nov 2024 18:45:21 +0100 Subject: [PATCH 1/8] handle raindrops as structs --- nametag/src/main.cpp | 50 ++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/nametag/src/main.cpp b/nametag/src/main.cpp index 2cb5e3b..ed3c95c 100644 --- a/nametag/src/main.cpp +++ b/nametag/src/main.cpp @@ -41,15 +41,30 @@ int line_length[PANEL_WIDTH]; // how long a line is for a given x coord int line_speed[PANEL_WIDTH]; // how fast each line moves unsigned long line_last_moved[PANEL_WIDTH]; +typedef struct { + int y; + int length; + int speed; + unsigned long last_moved; +} Raindrop; + +Raindrop raindrops[PANEL_WIDTH]; + void setup(){ Serial.begin(BAUD_RATE); pinMode(ONBOARD_LED, OUTPUT); for (int i = 0; iflipDMABuffer(); matrix->clearScreen(); delay(25); //matrix ->drawBitmap(0, 0, overlay, 64, 32, matrix->color565(64, 0, 0)); unsigned long timestamp = millis(); for (int x = 0; x < PANEL_WIDTH; x++) { - if ((timestamp - line_last_moved[x]) > line_speed[x]) { + if ((timestamp - raindrops[x].last_moved) > raindrops[x].speed) { // step down a pixel - line_pos[x]++; - line_last_moved[x] = timestamp; + raindrops[x].y++; + raindrops[x].last_moved = timestamp; } - if (line_pos[x] > PANEL_HEIGHT) { - line_pos[x] = 0; + if (raindrops[x].y > PANEL_HEIGHT) { + raindrops[x].y = 0; } - if (line_pos[x] >= 0) { + if (raindrops[x].y >= 0) { //draw our pixel - matrix->drawPixel(x, line_pos[x], matrix->color565(128, 255, 128)); + matrix->drawPixel(x, raindrops[x].y, matrix->color565(128, 255, 128)); // draw our trail - for (int trail_offset = 1; trail_offset < line_length[x]; trail_offset++) { - //if (random(10) > 8) { - // trail_offset++; - //} - int trail_y = line_pos[x] - trail_offset; + for (int trail_offset = 1; trail_offset < raindrops[x].length; trail_offset++) { + int trail_y = raindrops[x].y - trail_offset; if (trail_y >= 0) { int pixel_num = (trail_y * PANEL_WIDTH) + x; if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) )) { matrix->drawPixel(x, trail_y, matrix->color565(128, 255, 128)); } else { - matrix->drawPixel(x, trail_y, matrix->color565(0, (255 / line_length[x]) * (line_length[x] - trail_offset), 0)); + matrix->drawPixel(x, trail_y, matrix->color565(0, (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), 0)); } } else { int pixel_num = ((PANEL_HEIGHT + trail_y) * PANEL_WIDTH) + x; @@ -109,7 +120,7 @@ void loop() { if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) )) { matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(128, 255, 128)); } else { - matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(0,(255 / line_length[x]) * (line_length[x] - trail_offset), 0)); + matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(0,(255 / raindrops[x].length) * (raindrops[x].length - trail_offset), 0)); } } else { break; @@ -118,6 +129,5 @@ void loop() { } } } - //delay(25); } -- 2.39.5 From bcebde545d45c08b518f79bfa393353d67d71391 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sat, 7 Dec 2024 20:40:06 +0100 Subject: [PATCH 2/8] =?UTF-8?q?=F0=9F=98=8C=20don't=20draw=20trails=20on?= =?UTF-8?q?=20first=20drop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nametag/src/main.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nametag/src/main.cpp b/nametag/src/main.cpp index ed3c95c..00480b8 100644 --- a/nametag/src/main.cpp +++ b/nametag/src/main.cpp @@ -42,6 +42,7 @@ int line_speed[PANEL_WIDTH]; // how fast each line moves unsigned long line_last_moved[PANEL_WIDTH]; typedef struct { + bool reached_bottom = false; int y; int length; int speed; @@ -59,12 +60,7 @@ void setup(){ raindrops[i].length = random(20, 28); raindrops[i].speed = random(25, 100); raindrops[i].last_moved = millis(); - //raindrops[i] = rd; - - //line_pos[i] = 0 - random(24); - //line_length[i] = random(20, 28); - //line_speed[i] = random(25, 100); - //line_last_moved[i] = millis(); + //raindrops[i].reached_bottom = false; } // redefine pins if required HUB75_I2S_CFG::i2s_pins _pins={R1, G1, BL1, R2, G2, BL2, CH_A, CH_B, CH_C, CH_D, CH_E, LAT, OE, CLK}; @@ -100,6 +96,7 @@ void loop() { } if (raindrops[x].y > PANEL_HEIGHT) { raindrops[x].y = 0; + raindrops[x].reached_bottom = true; } if (raindrops[x].y >= 0) { //draw our pixel @@ -114,7 +111,7 @@ void loop() { } else { matrix->drawPixel(x, trail_y, matrix->color565(0, (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), 0)); } - } else { + } else if (raindrops[x].reached_bottom) { int pixel_num = ((PANEL_HEIGHT + trail_y) * PANEL_WIDTH) + x; if (line_pos[x] >= 0) { if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) )) { -- 2.39.5 From 722be35737a1f9b2485642e12fae13f6e1d9c9e0 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sat, 7 Dec 2024 20:53:35 +0100 Subject: [PATCH 3/8] =?UTF-8?q?=E2=9D=93add=20stealth=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nametag/src/main.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/nametag/src/main.cpp b/nametag/src/main.cpp index 00480b8..ca5f3d8 100644 --- a/nametag/src/main.cpp +++ b/nametag/src/main.cpp @@ -33,6 +33,8 @@ #define NUM_LEDS PANE_WIDTH*PANE_HEIGHT #define ONBOARD_LED 13 +#define BACK_BUTTON 6 + MatrixPanel_I2S_DMA *matrix = nullptr; @@ -51,9 +53,12 @@ typedef struct { Raindrop raindrops[PANEL_WIDTH]; +bool stealth_mode = false; + void setup(){ Serial.begin(BAUD_RATE); pinMode(ONBOARD_LED, OUTPUT); + pinMode(BACK_BUTTON, INPUT_PULLUP); for (int i = 0; iflipDMABuffer(); matrix->clearScreen(); delay(25); + + if(!digitalRead(BACK_BUTTON)) { + stealth_mode = !stealth_mode; + while(!digitalRead(BACK_BUTTON)); // Wait for release + } + //matrix ->drawBitmap(0, 0, overlay, 64, 32, matrix->color565(64, 0, 0)); unsigned long timestamp = millis(); for (int x = 0; x < PANEL_WIDTH; x++) { @@ -106,7 +117,7 @@ void loop() { int trail_y = raindrops[x].y - trail_offset; if (trail_y >= 0) { int pixel_num = (trail_y * PANEL_WIDTH) + x; - if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) )) { + if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) ) and !stealth_mode) { matrix->drawPixel(x, trail_y, matrix->color565(128, 255, 128)); } else { matrix->drawPixel(x, trail_y, matrix->color565(0, (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), 0)); @@ -114,7 +125,7 @@ void loop() { } else if (raindrops[x].reached_bottom) { int pixel_num = ((PANEL_HEIGHT + trail_y) * PANEL_WIDTH) + x; if (line_pos[x] >= 0) { - if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) )) { + if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) ) and !stealth_mode) { matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(128, 255, 128)); } else { matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(0,(255 / raindrops[x].length) * (raindrops[x].length - trail_offset), 0)); -- 2.39.5 From d861c43a0e2a88566bed723d038bebdf33af98ea Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sat, 7 Dec 2024 21:29:57 +0100 Subject: [PATCH 4/8] =?UTF-8?q?=E2=81=89=20three=20level=20visibility=20se?= =?UTF-8?q?tting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nametag/src/main.cpp | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/nametag/src/main.cpp b/nametag/src/main.cpp index ca5f3d8..88948d6 100644 --- a/nametag/src/main.cpp +++ b/nametag/src/main.cpp @@ -53,8 +53,13 @@ typedef struct { Raindrop raindrops[PANEL_WIDTH]; -bool stealth_mode = false; +enum Mode { + Stealth, + LowVis, + HighVis +}; +Mode mode = Stealth; void setup(){ Serial.begin(BAUD_RATE); pinMode(ONBOARD_LED, OUTPUT); @@ -93,7 +98,17 @@ void loop() { delay(25); if(!digitalRead(BACK_BUTTON)) { - stealth_mode = !stealth_mode; + switch(mode) { + case Stealth: + mode = LowVis; + break; + case LowVis: + mode = HighVis; + break; + case HighVis: + mode = Stealth; + break; + } while(!digitalRead(BACK_BUTTON)); // Wait for release } @@ -117,16 +132,33 @@ void loop() { int trail_y = raindrops[x].y - trail_offset; if (trail_y >= 0) { int pixel_num = (trail_y * PANEL_WIDTH) + x; - if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) ) and !stealth_mode) { - matrix->drawPixel(x, trail_y, matrix->color565(128, 255, 128)); + if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) ) and mode != Stealth) { + if (mode == HighVis) { + matrix->drawPixel(x, trail_y, matrix->color565(128, 255, 128)); + } else { + matrix->drawPixel(x, trail_y, matrix->color565( + (128 / raindrops[x].length) * (raindrops[x].length - trail_offset), + (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), + (128 / raindrops[x].length) * (raindrops[x].length - trail_offset)) + ); + } } else { matrix->drawPixel(x, trail_y, matrix->color565(0, (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), 0)); } } else if (raindrops[x].reached_bottom) { int pixel_num = ((PANEL_HEIGHT + trail_y) * PANEL_WIDTH) + x; if (line_pos[x] >= 0) { - if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) ) and !stealth_mode) { - matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(128, 255, 128)); + + if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) ) and mode != Stealth) { + if (mode == HighVis) { + matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(128, 255, 128)); + } else { + matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565( + (128 / raindrops[x].length) * (raindrops[x].length - trail_offset), + (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), + (128 / raindrops[x].length) * (raindrops[x].length - trail_offset)) + ); + } } else { matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(0,(255 / raindrops[x].length) * (raindrops[x].length - trail_offset), 0)); } -- 2.39.5 From 4290e2dea9955887536642ce701e1a91de88c4f6 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sat, 7 Dec 2024 23:09:51 +0100 Subject: [PATCH 5/8] =?UTF-8?q?=F0=9F=94=A5=20congress=20style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nametag/src/main.cpp | 115 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 94 insertions(+), 21 deletions(-) diff --git a/nametag/src/main.cpp b/nametag/src/main.cpp index 88948d6..c75bf28 100644 --- a/nametag/src/main.cpp +++ b/nametag/src/main.cpp @@ -5,6 +5,7 @@ #include "main.h" #include "caveatbrush9pt7b.h" +#include "pillowlava8pt7b.h" #include "overlay.h" #define R1 42 @@ -34,6 +35,7 @@ #define ONBOARD_LED 13 #define BACK_BUTTON 6 +#define NEXT_BUTTON 7 MatrixPanel_I2S_DMA *matrix = nullptr; @@ -59,11 +61,19 @@ enum Mode { HighVis }; +enum DisplayStyle { + Rain, + Congress +}; + Mode mode = Stealth; +DisplayStyle style = Congress; + void setup(){ Serial.begin(BAUD_RATE); pinMode(ONBOARD_LED, OUTPUT); pinMode(BACK_BUTTON, INPUT_PULLUP); + pinMode(NEXT_BUTTON, INPUT_PULLUP); for (int i = 0; ibegin(); matrix->setBrightness8(64); matrix->fillScreenRGB888(0, 0, 0); - matrix->setFont(&CaveatBrush_Regular9pt7b); + //matrix->setFont(&CaveatBrush_Regular9pt7b); + matrix->setFont(&Pilowlava_Regular8pt7b); } -void loop() { - matrix ->flipDMABuffer(); - matrix->clearScreen(); - delay(25); - - if(!digitalRead(BACK_BUTTON)) { - switch(mode) { - case Stealth: - mode = LowVis; - break; - case LowVis: - mode = HighVis; - break; - case HighVis: - mode = Stealth; - break; - } - while(!digitalRead(BACK_BUTTON)); // Wait for release - } - +void draw_rain() { //matrix ->drawBitmap(0, 0, overlay, 64, 32, matrix->color565(64, 0, 0)); unsigned long timestamp = millis(); for (int x = 0; x < PANEL_WIDTH; x++) { @@ -171,3 +163,84 @@ void loop() { } } +int running_text_pos = 7; + +void draw_congress() { + matrix->fillScreenRGB888(15, 0, 10); + uint16_t grid_color = matrix->color565(25, 11, 47); + + matrix->drawFastHLine(0, 0, PANEL_WIDTH, grid_color); + matrix->drawFastHLine(0, 7, PANEL_WIDTH, grid_color); + matrix->drawFastHLine(0, 24, PANEL_WIDTH, grid_color); + matrix->drawFastHLine(0, 31, PANEL_WIDTH, grid_color); + + matrix->drawFastVLine(0, 0, PANEL_HEIGHT, grid_color); + matrix->drawFastVLine(63, 0, PANEL_HEIGHT, grid_color); + int v_lines = PANEL_WIDTH / 7; + for(int v; v < v_lines; v++) { + matrix->drawFastVLine(v * 7, 0, 7, grid_color); + matrix->drawFastVLine(v * 7, 24, 7, grid_color); + } + matrix->setTextWrap(false); + matrix->setTextColor(matrix->color565(255, 80, 83)); + + if (mode == Stealth) { + matrix->setCursor(7, 21); + matrix->print("38C3"); + } else if (mode == LowVis) { + matrix->setCursor(2, 21); + matrix->print("Panki"); + } else if (mode == HighVis) { + matrix->setCursor(running_text_pos, 21); + String message = "38C3 - Panki - DECT 3389 - ALL YOUR BASE ARE BELONG TO US"; + matrix->print(message); + running_text_pos -= 1; + if (running_text_pos < -936) { // (0 - (13 * message.length()))) { + running_text_pos = 63; + }; + delay(75); + } +} + +void loop() { + matrix ->flipDMABuffer(); + matrix->clearScreen(); + delay(25); + + if(!digitalRead(BACK_BUTTON)) { + switch(mode) { + case Stealth: + mode = LowVis; + break; + case LowVis: + mode = HighVis; + break; + case HighVis: + mode = Stealth; + break; + } + while(!digitalRead(BACK_BUTTON)); // Wait for release + } + + if(!digitalRead(NEXT_BUTTON)) { + switch(style) { + case Rain: + style = Congress; + break; + case Congress: + style = Rain; + break; + } + while(!digitalRead(NEXT_BUTTON)); // Wait for release + } + + switch(style) { + case Rain: + draw_rain(); + break; + case Congress: + draw_congress(); + break; + } +} + -- 2.39.5 From 7463cb31f0ac6c59e3932094b3868e4bd6bc3ce2 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sun, 8 Dec 2024 00:51:28 +0100 Subject: [PATCH 6/8] =?UTF-8?q?=E2=99=BE=20perfect=20loop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nametag/src/main.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/nametag/src/main.cpp b/nametag/src/main.cpp index c75bf28..a660d5e 100644 --- a/nametag/src/main.cpp +++ b/nametag/src/main.cpp @@ -66,7 +66,7 @@ enum DisplayStyle { Congress }; -Mode mode = Stealth; +Mode mode = HighVis; DisplayStyle style = Congress; void setup(){ @@ -163,7 +163,7 @@ void draw_rain() { } } -int running_text_pos = 7; +int running_text_pos = 21; void draw_congress() { matrix->fillScreenRGB888(15, 0, 10); @@ -192,13 +192,19 @@ void draw_congress() { matrix->print("Panki"); } else if (mode == HighVis) { matrix->setCursor(running_text_pos, 21); - String message = "38C3 - Panki - DECT 3389 - ALL YOUR BASE ARE BELONG TO US"; + String message = "38C3 - Panki - DECT - 3389 - 38C3"; matrix->print(message); + if ((running_text_pos == 7) or (running_text_pos == - 70) or (running_text_pos == -146 ) or (running_text_pos == -216) ) { + delay(2000); + } running_text_pos -= 1; - if (running_text_pos < -936) { // (0 - (13 * message.length()))) { - running_text_pos = 63; + + if (running_text_pos < - 286 ) { // (0 - (13 * message.length()))) { + running_text_pos = 7; }; - delay(75); + matrix->drawFastVLine(0, 0, PANEL_HEIGHT, grid_color); + matrix->drawFastVLine(63, 0, PANEL_HEIGHT, grid_color); + delay(10); } } -- 2.39.5 From 3023ef488ee2e0ee1a09226cd4b5396c9782d724 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sun, 8 Dec 2024 11:53:39 +0100 Subject: [PATCH 7/8] =?UTF-8?q?=F0=9F=92=94=20add=20missing=20font?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nametag/src/pillowlava8pt7b.h | 229 ++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 nametag/src/pillowlava8pt7b.h diff --git a/nametag/src/pillowlava8pt7b.h b/nametag/src/pillowlava8pt7b.h new file mode 100644 index 0000000..9d609f3 --- /dev/null +++ b/nametag/src/pillowlava8pt7b.h @@ -0,0 +1,229 @@ +const uint8_t Pilowlava_Regular8pt7bBitmaps[] PROGMEM = { + 0x00, 0x38, 0xE3, 0x8E, 0x30, 0xC2, 0x08, 0x00, 0x8F, 0x3C, 0x00, 0x77, + 0x77, 0x66, 0xC4, 0x00, 0x00, 0x0D, 0x80, 0x34, 0x00, 0xD0, 0x1A, 0x80, + 0x38, 0xE6, 0x0F, 0xBF, 0x00, 0x00, 0xC0, 0x15, 0xC0, 0x53, 0x03, 0x40, + 0x09, 0x00, 0x06, 0x00, 0x60, 0x06, 0x07, 0x47, 0xFF, 0xFF, 0x0F, 0x7C, + 0x01, 0xF0, 0x04, 0xC7, 0x42, 0xE4, 0xFE, 0x7F, 0x5D, 0xE2, 0x64, 0x0E, + 0x00, 0xE0, 0x06, 0x00, 0x3F, 0xE4, 0x07, 0x4C, 0xE6, 0x9C, 0x29, 0x81, + 0x30, 0x06, 0x00, 0x60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, 0x31, 0x27, 0x39, 0x1F, 0x9F, 0x8F, 0x8F, 0x83, 0x87, 0x80, + 0x70, 0x7B, 0x87, 0xBC, 0x7D, 0xC6, 0x4E, 0x40, 0x74, 0x07, 0x80, 0xB0, + 0x3A, 0x07, 0x1F, 0x70, 0xF7, 0x07, 0x00, 0x07, 0x07, 0xB8, 0x7B, 0x87, + 0xDC, 0x6C, 0xE6, 0x07, 0x40, 0x78, 0x03, 0x80, 0x10, 0x1F, 0x01, 0xE0, + 0x1C, 0x00, 0xFF, 0xDF, 0x9F, 0xE7, 0xF1, 0xE0, 0x78, 0x1C, 0x06, 0x01, + 0xC0, 0x67, 0x1C, 0x7F, 0x87, 0xF0, 0x70, 0x00, 0x00, 0x30, 0x60, 0x82, + 0x04, 0x30, 0xC1, 0x81, 0x81, 0x01, 0x01, 0x03, 0x06, 0x0C, 0x00, 0x9B, + 0xFE, 0xEF, 0xF0, 0x00, 0x3E, 0x76, 0x20, 0x03, 0x6C, 0xD4, 0xD5, 0x33, + 0xDF, 0xD0, 0x3C, 0x00, 0x04, 0xA7, 0x80, 0x00, 0x2F, 0xFC, 0x3F, 0xF0, + 0x00, 0x01, 0xC1, 0x83, 0x02, 0x02, 0x03, 0x06, 0x0C, 0x18, 0x41, 0x02, + 0x0C, 0x38, 0x20, 0x00, 0x9B, 0xFE, 0xEF, 0xF0, 0x00, 0x3E, 0x76, 0x20, + 0x03, 0x6C, 0xD4, 0xD5, 0x33, 0xDF, 0xD0, 0x3C, 0x00, 0x04, 0xA7, 0x80, + 0x00, 0x2F, 0xFC, 0x3F, 0xF0 }; + +const GFXglyph Pilowlava_Regular8pt7bGlyphs[] PROGMEM = { + { 0, 1, 1, 6, 0, 0 }, // 0x20 ' ' + { 1, 6, 13, 6, 0, -11 }, // 0x21 '!' + { 11, 8, 4, 9, 0, -11 }, // 0x22 '"' + { 15, 14, 13, 14, 0, -12 }, // 0x23 '#' + { 38, 12, 17, 14, 1, -13 }, // 0x24 '$' + { 64, 12, 12, 12, 0, -11 }, // 0x25 '%' + { 82, 14, 12, 15, 1, -11 }, // 0x26 '&' + { 103, 4, 4, 5, 0, -11 }, // 0x27 ''' + { 105, 5, 16, 6, 1, -13 }, // 0x28 '(' + { 115, 5, 16, 6, 0, -13 }, // 0x29 ')' + { 125, 7, 7, 9, 1, -11 }, // 0x2A '*' + { 132, 14, 14, 18, 2, -12 }, // 0x2B '+' + { 157, 4, 5, 5, 0, -2 }, // 0x2C ',' + { 160, 6, 2, 7, 0, -6 }, // 0x2D '-' + { 162, 4, 3, 4, 0, -2 }, // 0x2E '.' + { 164, 7, 12, 7, 0, -11 }, // 0x2F '/' + { 175, 11, 12, 13, 1, -11 }, // 0x30 '0' + { 192, 6, 12, 7, 0, -11 }, // 0x31 '1' + { 201, 11, 12, 13, 1, -11 }, // 0x32 '2' + { 218, 11, 12, 13, 1, -11 }, // 0x33 '3' + { 235, 12, 12, 13, 0, -11 }, // 0x34 '4' + { 253, 10, 12, 12, 1, -11 }, // 0x35 '5' + { 268, 12, 12, 13, 1, -11 }, // 0x36 '6' + { 286, 11, 12, 11, 0, -11 }, // 0x37 '7' + { 303, 11, 12, 13, 1, -11 }, // 0x38 '8' + { 320, 11, 12, 13, 1, -11 }, // 0x39 '9' + { 337, 3, 9, 5, 1, -9 }, // 0x3A ':' + { 341, 4, 12, 5, 0, -9 }, // 0x3B ';' + { 347, 14, 14, 18, 2, -12 }, // 0x3C '<' + { 372, 9, 5, 10, 1, -7 }, // 0x3D '=' + { 378, 14, 14, 18, 2, -12 }, // 0x3E '>' + { 403, 10, 12, 11, 0, -11 }, // 0x3F '?' + { 418, 13, 12, 15, 1, -11 }, // 0x40 '@' + { 438, 12, 12, 13, 0, -11 }, // 0x41 'A' + { 456, 12, 12, 14, 1, -11 }, // 0x42 'B' + { 474, 11, 13, 13, 1, -11 }, // 0x43 'C' + { 492, 12, 12, 14, 1, -11 }, // 0x44 'D' + { 510, 11, 12, 13, 1, -11 }, // 0x45 'E' + { 527, 11, 12, 12, 1, -11 }, // 0x46 'F' + { 544, 12, 12, 14, 1, -11 }, // 0x47 'G' + { 562, 12, 12, 14, 1, -11 }, // 0x48 'H' + { 580, 5, 12, 7, 1, -11 }, // 0x49 'I' + { 588, 7, 12, 8, 0, -11 }, // 0x4A 'J' + { 599, 12, 12, 14, 1, -11 }, // 0x4B 'K' + { 617, 8, 12, 9, 1, -11 }, // 0x4C 'L' + { 629, 16, 12, 18, 1, -11 }, // 0x4D 'M' + { 653, 12, 12, 14, 1, -11 }, // 0x4E 'N' + { 671, 11, 12, 13, 1, -11 }, // 0x4F 'O' + { 688, 11, 12, 13, 1, -11 }, // 0x50 'P' + { 705, 13, 15, 15, 1, -11 }, // 0x51 'Q' + { 730, 12, 12, 14, 1, -11 }, // 0x52 'R' + { 748, 11, 12, 13, 1, -11 }, // 0x53 'S' + { 765, 12, 12, 12, 0, -11 }, // 0x54 'T' + { 783, 10, 12, 12, 1, -11 }, // 0x55 'U' + { 798, 12, 12, 12, 0, -11 }, // 0x56 'V' + { 816, 17, 12, 18, 0, -11 }, // 0x57 'W' + { 842, 12, 12, 13, 0, -11 }, // 0x58 'X' + { 860, 12, 13, 12, 0, -12 }, // 0x59 'Y' + { 880, 11, 12, 13, 1, -11 }, // 0x5A 'Z' + { 897, 6, 16, 7, 1, -13 }, // 0x5B '[' + { 909, 7, 12, 7, 0, -11 }, // 0x5C '\' + { 920, 6, 16, 7, 0, -13 }, // 0x5D ']' + { 932, 7, 3, 9, 1, -11 }, // 0x5E '^' + { 935, 12, 2, 13, 0, 1 }, // 0x5F '_' + { 938, 5, 2, 9, 1, -14 }, // 0x60 '`' + { 940, 12, 12, 13, 0, -11 }, // 0x61 'a' + { 958, 12, 12, 14, 1, -11 }, // 0x62 'b' + { 976, 11, 13, 13, 1, -11 }, // 0x63 'c' + { 994, 12, 12, 14, 1, -11 }, // 0x64 'd' + { 1012, 11, 12, 13, 1, -11 }, // 0x65 'e' + { 1029, 11, 12, 12, 1, -11 }, // 0x66 'f' + { 1046, 12, 12, 14, 1, -11 }, // 0x67 'g' + { 1064, 12, 12, 14, 1, -11 }, // 0x68 'h' + { 1082, 5, 12, 7, 1, -11 }, // 0x69 'i' + { 1090, 7, 12, 8, 0, -11 }, // 0x6A 'j' + { 1101, 12, 12, 14, 1, -11 }, // 0x6B 'k' + { 1119, 8, 12, 9, 1, -11 }, // 0x6C 'l' + { 1131, 16, 12, 18, 1, -11 }, // 0x6D 'm' + { 1155, 12, 12, 14, 1, -11 }, // 0x6E 'n' + { 1173, 11, 12, 13, 1, -11 }, // 0x6F 'o' + { 1190, 11, 12, 13, 1, -11 }, // 0x70 'p' + { 1207, 13, 15, 15, 1, -11 }, // 0x71 'q' + { 1232, 12, 12, 14, 1, -11 }, // 0x72 'r' + { 1250, 11, 12, 13, 1, -11 }, // 0x73 's' + { 1267, 12, 12, 12, 0, -11 }, // 0x74 't' + { 1285, 10, 12, 12, 1, -11 }, // 0x75 'u' + { 1300, 12, 12, 12, 0, -11 }, // 0x76 'v' + { 1318, 17, 12, 18, 0, -11 }, // 0x77 'w' + { 1344, 12, 12, 13, 0, -11 }, // 0x78 'x' + { 1362, 12, 13, 12, 0, -12 }, // 0x79 'y' + { 1382, 11, 12, 13, 1, -11 }, // 0x7A 'z' + { 1399, 7, 18, 7, 0, -14 }, // 0x7B '{' + { 1415, 14, 14, 18, 2, -12 }, // 0x7C '|' + { 1440, 7, 18, 7, -1, -14 }, // 0x7D '}' + { 1456, 14, 14, 18, 2, -12 } }; // 0x7E '~' + +const GFXfont Pilowlava_Regular8pt7b PROGMEM = { + (uint8_t *)Pilowlava_Regular8pt7bBitmaps, + (GFXglyph *)Pilowlava_Regular8pt7bGlyphs, + 0x20, 0x7E, 19 }; + +// Approx. 2153 bytes -- 2.39.5 From 64346ba9b6861c65b31769c1ca8277b13cd5cb57 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sun, 8 Dec 2024 15:11:55 +0100 Subject: [PATCH 8/8] =?UTF-8?q?=F0=9F=A7=B9=20refactor=20things=20into=20t?= =?UTF-8?q?heir=20own=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nametag/platformio.ini | 1 + nametag/src/congress.cpp | 47 ++++++++++ nametag/src/congress.h | 4 + nametag/src/constants.h | 29 +++++++ nametag/src/enums.h | 13 +++ nametag/src/main.cpp | 181 ++------------------------------------- nametag/src/rain.cpp | 87 +++++++++++++++++++ nametag/src/rain.h | 4 + 8 files changed, 191 insertions(+), 175 deletions(-) create mode 100644 nametag/src/congress.cpp create mode 100644 nametag/src/congress.h create mode 100644 nametag/src/constants.h create mode 100644 nametag/src/enums.h create mode 100644 nametag/src/rain.cpp create mode 100644 nametag/src/rain.h diff --git a/nametag/platformio.ini b/nametag/platformio.ini index 0e62411..aada770 100644 --- a/nametag/platformio.ini +++ b/nametag/platformio.ini @@ -13,6 +13,7 @@ platform = espressif32 board = adafruit_matrixportal_esp32s3 framework = arduino monitor_speed = 115200 +build_flags = -Ilib -Isrc lib_deps = adafruit/Adafruit GFX Library diff --git a/nametag/src/congress.cpp b/nametag/src/congress.cpp new file mode 100644 index 0000000..f0ac71d --- /dev/null +++ b/nametag/src/congress.cpp @@ -0,0 +1,47 @@ +#include "constants.h" +#include "congress.h" + +int running_text_pos = 21; + +void draw_congress(MatrixPanel_I2S_DMA *matrix, enum Mode mode) { + uint16_t grid_color = matrix->color565(25, 11, 47); + matrix->fillScreenRGB888(15, 0, 10); + + matrix->drawFastHLine(0, 0, PANEL_WIDTH, grid_color); + matrix->drawFastHLine(0, 7, PANEL_WIDTH, grid_color); + matrix->drawFastHLine(0, 24, PANEL_WIDTH, grid_color); + matrix->drawFastHLine(0, 31, PANEL_WIDTH, grid_color); + + matrix->drawFastVLine(0, 0, PANEL_HEIGHT, grid_color); + matrix->drawFastVLine(63, 0, PANEL_HEIGHT, grid_color); + int v_lines = PANEL_WIDTH / 7; + for(int v; v < v_lines; v++) { + matrix->drawFastVLine(v * 7, 0, 7, grid_color); + matrix->drawFastVLine(v * 7, 24, 7, grid_color); + } + matrix->setTextWrap(false); + matrix->setTextColor(matrix->color565(255, 80, 83)); + + if (mode == Stealth) { + matrix->setCursor(7, 21); + matrix->print("38C3"); + } else if (mode == LowVis) { + matrix->setCursor(2, 21); + matrix->print("Panki"); + } else if (mode == HighVis) { + matrix->setCursor(running_text_pos, 21); + String message = "38C3 - Panki - DECT - 3389 - 38C3"; + matrix->print(message); + if ((running_text_pos == 7) or (running_text_pos == - 70) or (running_text_pos == -146 ) or (running_text_pos == -216) ) { + delay(2000); + } + running_text_pos -= 1; + + if (running_text_pos < - 286 ) { // (0 - (13 * message.length()))) { + running_text_pos = 7; + }; + matrix->drawFastVLine(0, 0, PANEL_HEIGHT, grid_color); + matrix->drawFastVLine(63, 0, PANEL_HEIGHT, grid_color); + delay(10); + } +} diff --git a/nametag/src/congress.h b/nametag/src/congress.h new file mode 100644 index 0000000..a179aaa --- /dev/null +++ b/nametag/src/congress.h @@ -0,0 +1,4 @@ +#include "xtensa/core-macros.h" +#include +#include "enums.h" +void draw_congress(MatrixPanel_I2S_DMA *matrix, enum Mode mode); diff --git a/nametag/src/constants.h b/nametag/src/constants.h new file mode 100644 index 0000000..0f1a12f --- /dev/null +++ b/nametag/src/constants.h @@ -0,0 +1,29 @@ +#define R1 42 +#define G1 40 +#define BL1 41 +#define R2 38 +#define G2 37 +#define BL2 39 +#define CH_A 45 +#define CH_B 36 +#define CH_C 48 +#define CH_D 35 +#define CH_E 21 +#define CLK 2 +#define LAT 47 +#define OE 14 + +#define PIN_E 21 +#define PANEL_WIDTH 64 +#define PANEL_HEIGHT 32 // Panel height of 64 will required PIN_E to be defined. + +#define PANELS_NUMBER 1 + +#define PANE_WIDTH PANEL_WIDTH * PANELS_NUMBER +#define PANE_HEIGHT PANEL_HEIGHT +#define NUM_LEDS PANE_WIDTH*PANE_HEIGHT + +#define ONBOARD_LED 13 +#define BACK_BUTTON 6 +#define NEXT_BUTTON 7 + diff --git a/nametag/src/enums.h b/nametag/src/enums.h new file mode 100644 index 0000000..34928b6 --- /dev/null +++ b/nametag/src/enums.h @@ -0,0 +1,13 @@ +#ifndef INCLUDED_ENUMS +#define INCLUDED_ENUMS +enum Mode { + Stealth, + LowVis, + HighVis +}; + +enum DisplayStyle { + Rain, + Congress +}; +#endif diff --git a/nametag/src/main.cpp b/nametag/src/main.cpp index a660d5e..aab3099 100644 --- a/nametag/src/main.cpp +++ b/nametag/src/main.cpp @@ -3,86 +3,23 @@ #include #include "main.h" +#include "constants.h" +#include "congress.h" +#include "rain.h" -#include "caveatbrush9pt7b.h" #include "pillowlava8pt7b.h" -#include "overlay.h" - -#define R1 42 -#define G1 40 -#define BL1 41 -#define R2 38 -#define G2 37 -#define BL2 39 -#define CH_A 45 -#define CH_B 36 -#define CH_C 48 -#define CH_D 35 -#define CH_E 21 -#define CLK 2 -#define LAT 47 -#define OE 14 - -#define PIN_E 21 -#define PANEL_WIDTH 64 -#define PANEL_HEIGHT 32 // Panel height of 64 will required PIN_E to be defined. - -#define PANELS_NUMBER 1 - -#define PANE_WIDTH PANEL_WIDTH * PANELS_NUMBER -#define PANE_HEIGHT PANEL_HEIGHT -#define NUM_LEDS PANE_WIDTH*PANE_HEIGHT - -#define ONBOARD_LED 13 -#define BACK_BUTTON 6 -#define NEXT_BUTTON 7 - MatrixPanel_I2S_DMA *matrix = nullptr; -int line_pos[PANEL_WIDTH]; // where a rain marker is (y coordinate) -int line_length[PANEL_WIDTH]; // how long a line is for a given x coord -int line_speed[PANEL_WIDTH]; // how fast each line moves -unsigned long line_last_moved[PANEL_WIDTH]; - -typedef struct { - bool reached_bottom = false; - int y; - int length; - int speed; - unsigned long last_moved; -} Raindrop; - -Raindrop raindrops[PANEL_WIDTH]; - -enum Mode { - Stealth, - LowVis, - HighVis -}; - -enum DisplayStyle { - Rain, - Congress -}; - Mode mode = HighVis; DisplayStyle style = Congress; void setup(){ - Serial.begin(BAUD_RATE); pinMode(ONBOARD_LED, OUTPUT); pinMode(BACK_BUTTON, INPUT_PULLUP); pinMode(NEXT_BUTTON, INPUT_PULLUP); - for (int i = 0; ibegin(); matrix->setBrightness8(64); matrix->fillScreenRGB888(0, 0, 0); - //matrix->setFont(&CaveatBrush_Regular9pt7b); matrix->setFont(&Pilowlava_Regular8pt7b); } -void draw_rain() { - //matrix ->drawBitmap(0, 0, overlay, 64, 32, matrix->color565(64, 0, 0)); - unsigned long timestamp = millis(); - for (int x = 0; x < PANEL_WIDTH; x++) { - if ((timestamp - raindrops[x].last_moved) > raindrops[x].speed) { - // step down a pixel - raindrops[x].y++; - raindrops[x].last_moved = timestamp; - } - if (raindrops[x].y > PANEL_HEIGHT) { - raindrops[x].y = 0; - raindrops[x].reached_bottom = true; - } - if (raindrops[x].y >= 0) { - //draw our pixel - matrix->drawPixel(x, raindrops[x].y, matrix->color565(128, 255, 128)); - // draw our trail - for (int trail_offset = 1; trail_offset < raindrops[x].length; trail_offset++) { - int trail_y = raindrops[x].y - trail_offset; - if (trail_y >= 0) { - int pixel_num = (trail_y * PANEL_WIDTH) + x; - if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) ) and mode != Stealth) { - if (mode == HighVis) { - matrix->drawPixel(x, trail_y, matrix->color565(128, 255, 128)); - } else { - matrix->drawPixel(x, trail_y, matrix->color565( - (128 / raindrops[x].length) * (raindrops[x].length - trail_offset), - (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), - (128 / raindrops[x].length) * (raindrops[x].length - trail_offset)) - ); - } - } else { - matrix->drawPixel(x, trail_y, matrix->color565(0, (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), 0)); - } - } else if (raindrops[x].reached_bottom) { - int pixel_num = ((PANEL_HEIGHT + trail_y) * PANEL_WIDTH) + x; - if (line_pos[x] >= 0) { - - if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) ) and mode != Stealth) { - if (mode == HighVis) { - matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(128, 255, 128)); - } else { - matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565( - (128 / raindrops[x].length) * (raindrops[x].length - trail_offset), - (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), - (128 / raindrops[x].length) * (raindrops[x].length - trail_offset)) - ); - } - } else { - matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(0,(255 / raindrops[x].length) * (raindrops[x].length - trail_offset), 0)); - } - } else { - break; - } - } - } - } - } -} - -int running_text_pos = 21; - -void draw_congress() { - matrix->fillScreenRGB888(15, 0, 10); - uint16_t grid_color = matrix->color565(25, 11, 47); - - matrix->drawFastHLine(0, 0, PANEL_WIDTH, grid_color); - matrix->drawFastHLine(0, 7, PANEL_WIDTH, grid_color); - matrix->drawFastHLine(0, 24, PANEL_WIDTH, grid_color); - matrix->drawFastHLine(0, 31, PANEL_WIDTH, grid_color); - - matrix->drawFastVLine(0, 0, PANEL_HEIGHT, grid_color); - matrix->drawFastVLine(63, 0, PANEL_HEIGHT, grid_color); - int v_lines = PANEL_WIDTH / 7; - for(int v; v < v_lines; v++) { - matrix->drawFastVLine(v * 7, 0, 7, grid_color); - matrix->drawFastVLine(v * 7, 24, 7, grid_color); - } - matrix->setTextWrap(false); - matrix->setTextColor(matrix->color565(255, 80, 83)); - - if (mode == Stealth) { - matrix->setCursor(7, 21); - matrix->print("38C3"); - } else if (mode == LowVis) { - matrix->setCursor(2, 21); - matrix->print("Panki"); - } else if (mode == HighVis) { - matrix->setCursor(running_text_pos, 21); - String message = "38C3 - Panki - DECT - 3389 - 38C3"; - matrix->print(message); - if ((running_text_pos == 7) or (running_text_pos == - 70) or (running_text_pos == -146 ) or (running_text_pos == -216) ) { - delay(2000); - } - running_text_pos -= 1; - - if (running_text_pos < - 286 ) { // (0 - (13 * message.length()))) { - running_text_pos = 7; - }; - matrix->drawFastVLine(0, 0, PANEL_HEIGHT, grid_color); - matrix->drawFastVLine(63, 0, PANEL_HEIGHT, grid_color); - delay(10); - } -} - void loop() { matrix ->flipDMABuffer(); matrix->clearScreen(); @@ -242,10 +73,10 @@ void loop() { switch(style) { case Rain: - draw_rain(); + draw_rain(matrix, mode); break; case Congress: - draw_congress(); + draw_congress(matrix, mode); break; } } diff --git a/nametag/src/rain.cpp b/nametag/src/rain.cpp new file mode 100644 index 0000000..21348d5 --- /dev/null +++ b/nametag/src/rain.cpp @@ -0,0 +1,87 @@ +#include "rain.h" +#include "constants.h" +#include "overlay.h" + +typedef struct { + bool reached_bottom = false; + int y; + int length; + int speed; + unsigned long last_moved; +} Raindrop; + +Raindrop raindrops[PANEL_WIDTH]; +bool rain_initialized = false; + +void setup_rain() { + for (int i = 0; idrawBitmap(0, 0, overlay, 64, 32, matrix->color565(64, 0, 0)); + if (!rain_initialized) { + setup_rain(); + rain_initialized = true; + } + unsigned long timestamp = millis(); + for (int x = 0; x < PANEL_WIDTH; x++) { + if ((timestamp - raindrops[x].last_moved) > raindrops[x].speed) { + // step down a pixel + raindrops[x].y++; + raindrops[x].last_moved = timestamp; + } + if (raindrops[x].y > PANEL_HEIGHT) { + raindrops[x].y = 0; + raindrops[x].reached_bottom = true; + } + if (raindrops[x].y >= 0) { + //draw our pixel + matrix->drawPixel(x, raindrops[x].y, matrix->color565(128, 255, 128)); + // draw our trail + for (int trail_offset = 1; trail_offset < raindrops[x].length; trail_offset++) { + int trail_y = raindrops[x].y - trail_offset; + if (trail_y >= 0) { + int pixel_num = (trail_y * PANEL_WIDTH) + x; + if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) ) and mode != Stealth) { + if (mode == HighVis) { + matrix->drawPixel(x, trail_y, matrix->color565(128, 255, 128)); + } else { + matrix->drawPixel(x, trail_y, matrix->color565( + (128 / raindrops[x].length) * (raindrops[x].length - trail_offset), + (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), + (128 / raindrops[x].length) * (raindrops[x].length - trail_offset)) + ); + } + } else { + matrix->drawPixel(x, trail_y, matrix->color565(0, (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), 0)); + } + } else if (raindrops[x].reached_bottom) { + int pixel_num = ((PANEL_HEIGHT + trail_y) * PANEL_WIDTH) + x; + if (raindrops[x].y >= 0) { + + if (overlay[ pixel_num / 8 ] & (1 << (7 - (pixel_num % 8)) ) and mode != Stealth) { + if (mode == HighVis) { + matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(128, 255, 128)); + } else { + matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565( + (128 / raindrops[x].length) * (raindrops[x].length - trail_offset), + (255 / raindrops[x].length) * (raindrops[x].length - trail_offset), + (128 / raindrops[x].length) * (raindrops[x].length - trail_offset)) + ); + } + } else { + matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(0,(255 / raindrops[x].length) * (raindrops[x].length - trail_offset), 0)); + } + } else { + break; + } + } + } + } + } +} diff --git a/nametag/src/rain.h b/nametag/src/rain.h new file mode 100644 index 0000000..526f2d1 --- /dev/null +++ b/nametag/src/rain.h @@ -0,0 +1,4 @@ +#include "xtensa/core-macros.h" +#include +#include "enums.h" +void draw_rain(MatrixPanel_I2S_DMA *matrix, enum Mode mode); -- 2.39.5