From 2035272b511004ecd8b157147c170cb5305d9b95 Mon Sep 17 00:00:00 2001 From: "David Todd (c0de)" Date: Fri, 6 Jul 2018 01:07:19 -0500 Subject: [PATCH] Show a pixo-icon on screen for a delayed amount of time --- FIRMWARE/pixo-display/pixo-display-helper.ino | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/FIRMWARE/pixo-display/pixo-display-helper.ino b/FIRMWARE/pixo-display/pixo-display-helper.ino index 7d3349e..e671141 100644 --- a/FIRMWARE/pixo-display/pixo-display-helper.ino +++ b/FIRMWARE/pixo-display/pixo-display-helper.ino @@ -38,4 +38,25 @@ void loop() { uint32_t t; while (((t = micros()) - prevTime) < (1000000L / MAX_FPS)); // FPS Limit? prevTime = t; + + showImage(twitter, 1000); +/* + * showImage, displays an image to the display with no animation + * args: + * - img[256][3] - Standard Pixo-Style icon + * - dlytime - The amount of time (in ms) to keep the image on the display + */ +void showImage(int img[256][3], int dlytime) { + matrix.fillScreen(0); + + for (int i=0; i<256; i++){ + matrix.setPixelColor(i, img[i][0], img[i][1], img[i][2]); + } + + matrix.show(); + delay(dlytime); + + matrix.fillScreen(0); + matrix.show(); +} }