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 scrollingText(String text, int speed, int color);
|
||||||
void playGif(const uint16_t* gifData[], int frameCount, int frameDelay);
|
void playGif(const uint16_t* gifData[], int frameCount, int frameDelay);
|
||||||
void displayFullScreenBMP(const uint16_t* bitmap);
|
void displayFullScreenBMP(const uint16_t* bitmap);
|
||||||
|
void bootSequence();
|
||||||
|
|
||||||
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 8, PIN,
|
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 8, PIN,
|
||||||
NEO_MATRIX_BOTTOM + NEO_MATRIX_RIGHT +
|
NEO_MATRIX_BOTTOM + NEO_MATRIX_RIGHT +
|
||||||
@@ -48,20 +49,22 @@ Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 8, PIN,
|
|||||||
NEO_GRB + NEO_KHZ800);
|
NEO_GRB + NEO_KHZ800);
|
||||||
|
|
||||||
const uint16_t colors[] = {
|
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() {
|
void setup() {
|
||||||
matrix.begin();
|
matrix.begin();
|
||||||
matrix.setTextWrap(false);
|
matrix.setTextWrap(false);
|
||||||
matrix.setBrightness(10);
|
matrix.setBrightness(25);
|
||||||
matrix.setTextColor(matrix.Color(255, 255, 255));
|
matrix.setTextColor(matrix.Color(255, 255, 255));
|
||||||
|
|
||||||
|
bootSequence();
|
||||||
}
|
}
|
||||||
|
|
||||||
int x = matrix.width();
|
int x = matrix.width();
|
||||||
int pass = 0;
|
int pass = 0;
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
scrollingText("Hello World!", 100, 0xFFFFFF);
|
scrollingText("BOO AAAA!", 50, matrix.Color(255, 0, 255));
|
||||||
}
|
}
|
||||||
|
|
||||||
void scrollingText(String text, int speed, int color) {
|
void scrollingText(String text, int speed, int color) {
|
||||||
@@ -114,4 +117,17 @@ void displayFullScreenBMP(const uint16_t* bitmap) {
|
|||||||
int height = matrix.height();
|
int height = matrix.height();
|
||||||
matrix.drawRGBBitmap(0, 0, bitmap, width, height);
|
matrix.drawRGBBitmap(0, 0, bitmap, width, height);
|
||||||
matrix.show();
|
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