add my name 😎

master
Felix Pankratz 5 days ago
parent 4c39671850
commit 88971bd6ab

@ -5,6 +5,7 @@
#include "main.h" #include "main.h"
#include "caveatbrush9pt7b.h" #include "caveatbrush9pt7b.h"
#include "overlay.h"
#define R1 42 #define R1 42
#define G1 40 #define G1 40
@ -56,8 +57,8 @@ void setup(){
pinMode(ONBOARD_LED, OUTPUT); pinMode(ONBOARD_LED, OUTPUT);
for (int i = 0; i<PANEL_WIDTH; i++) { for (int i = 0; i<PANEL_WIDTH; i++) {
line_pos[i] = 0 - random(32); line_pos[i] = 0 - random(24);
line_length[i] = random(5, 12); line_length[i] = random(12, 24);
line_speed[i] = random(10, 100); line_speed[i] = random(10, 100);
} }
// redefine pins if required // redefine pins if required
@ -83,6 +84,7 @@ const char *str = "Panki";
void loop() { void loop() {
matrix->fillScreenRGB888(0, 0, 0); matrix->fillScreenRGB888(0, 0, 0);
//matrix ->drawBitmap(0, 0, overlay, 64, 32, matrix->color565(64, 0, 0));
for (int x = 0; x < PANEL_WIDTH; x++) { for (int x = 0; x < PANEL_WIDTH; x++) {
// step down a pixel // step down a pixel
line_pos[x]++; line_pos[x]++;
@ -99,10 +101,21 @@ void loop() {
//} //}
int trail_y = line_pos[x] - trail_offset; int trail_y = line_pos[x] - trail_offset;
if (trail_y >= 0) { if (trail_y >= 0) {
//if (overlay[ (trail_y * PANEL_WIDTH) + x ]) {
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 / line_length[x]) * (line_length[x] - trail_offset), 0));
}
} else { } else {
int pixel_num = ((PANEL_HEIGHT + trail_y) * PANEL_WIDTH) + x;
if (line_pos[x] >= 0) { if (line_pos[x] >= 0) {
matrix->drawPixel(x, PANEL_HEIGHT + trail_y, matrix->color565(0, 255 - (trail_offset * 16) , 0)); 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));
}
} else { } else {
break; break;
} }

@ -0,0 +1,19 @@
const unsigned char overlay [] PROGMEM = {
// 'bw, 64x32px
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x70,
0x0f, 0xf0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x20, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
0x0c, 0x1c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x0e, 0x3f, 0x0e, 0xf8, 0x60, 0xc0, 0x70,
0x0c, 0x06, 0x3f, 0x8f, 0xfc, 0x61, 0xc0, 0x70, 0x0c, 0x06, 0x01, 0xc3, 0x8c, 0x63, 0x80, 0x70,
0x0c, 0x0e, 0x00, 0xc3, 0x0c, 0x67, 0x00, 0x70, 0x0f, 0xfc, 0x3f, 0xc3, 0x0c, 0x7e, 0x00, 0x70,
0x0f, 0xf8, 0x7f, 0xc3, 0x0c, 0x7e, 0x00, 0x70, 0x0f, 0xf0, 0xff, 0xc3, 0x0c, 0x7e, 0x00, 0x70,
0x0c, 0x00, 0xc0, 0xc3, 0x0c, 0x67, 0x00, 0x70, 0x0c, 0x00, 0xe0, 0xc3, 0x0c, 0x63, 0x80, 0x70,
0x0c, 0x00, 0x7f, 0xe3, 0x0c, 0x61, 0xc0, 0x70, 0x0c, 0x00, 0x3f, 0xf3, 0x0c, 0x60, 0xc0, 0x70,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
Loading…
Cancel
Save