mirror of
https://gitlab.waag.org/make/fablab/interns/2025/sam.git
synced 2025-08-03 11:54:58 +00:00
added useless boot sequence
This commit is contained in:
@@ -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) {
|
||||
@@ -115,3 +118,16 @@ void displayFullScreenBMP(const uint16_t* bitmap) {
|
||||
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);
|
||||
|
||||
}
|
Reference in New Issue
Block a user