From 2dd30990bcb2301077ba04c2fbb7c3af511281fc Mon Sep 17 00:00:00 2001 From: Sam Hos Date: Tue, 27 May 2025 15:29:12 +0200 Subject: [PATCH] added useless boot sequence --- src/Fab Matrixes/src/main.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Fab Matrixes/src/main.cpp b/src/Fab Matrixes/src/main.cpp index a3b7f28..036f5b4 100644 --- a/src/Fab Matrixes/src/main.cpp +++ b/src/Fab Matrixes/src/main.cpp @@ -41,6 +41,7 @@ void scrollingText(String text, int speed, int color); void playGif(const uint16_t* gifData[], int frameCount, int frameDelay); void displayFullScreenBMP(const uint16_t* bitmap); +void bootSequence(); Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 8, PIN, NEO_MATRIX_BOTTOM + NEO_MATRIX_RIGHT + @@ -48,20 +49,22 @@ Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 8, PIN, NEO_GRB + NEO_KHZ800); const uint16_t colors[] = { - matrix.Color(255, 0, 0), matrix.Color(0, 255, 0), matrix.Color(0, 0, 255) }; + matrix.Color(255, 0, 0), matrix.Color(0, 255, 0), matrix.Color(0, 0, 255) }; //RGB void setup() { matrix.begin(); matrix.setTextWrap(false); - matrix.setBrightness(10); + matrix.setBrightness(25); matrix.setTextColor(matrix.Color(255, 255, 255)); + + bootSequence(); } int x = matrix.width(); int pass = 0; void loop() { - scrollingText("Hello World!", 100, 0xFFFFFF); + scrollingText("BOO AAAA!", 50, matrix.Color(255, 0, 255)); } void scrollingText(String text, int speed, int color) { @@ -114,4 +117,17 @@ void displayFullScreenBMP(const uint16_t* bitmap) { int height = matrix.height(); matrix.drawRGBBitmap(0, 0, bitmap, width, height); matrix.show(); +} + +void bootSequence() { +//just display something cool on startup. This is hardcoded asf + + matrix.fillScreen(0); + matrix.setCursor(5, 0); + matrix.setTextColor(matrix.Color(0, 0, 255)); + matrix.print("Boot"); + matrix.show(); + + delay(5000); + } \ No newline at end of file