diff --git a/Contador_matriz_led_48x16/Contador_matriz_led_48x16.ino b/Contador_matriz_led_48x16/Contador_matriz_led_48x16.ino index 0bb25af..d8bd61d 100644 --- a/Contador_matriz_led_48x16/Contador_matriz_led_48x16.ino +++ b/Contador_matriz_led_48x16/Contador_matriz_led_48x16.ino @@ -1,6 +1,7 @@ #include #include #include +#include #include @@ -54,12 +55,26 @@ uint8_t reset_release; void print_count() { + if(counter <= 999){ + if(counter == 0) + matrix.setFont(&FreeMonoBold12pt7b); + + matrix.setCursor(2, 15); + + }else{ + if(counter == 1000) + matrix.setFont(&FreeMono9pt7b); + + matrix.setCursor(2, 13); + } + matrix.fillScreen(0); - matrix.setCursor(2, 15); matrix.print(counter); + matrix.show(); } + void setup() { pinMode(INCREMENT_BUTTON_PIN, INPUT_PULLUP); @@ -69,7 +84,6 @@ void setup() matrix.setTextWrap(false); matrix.setBrightness(100); matrix.setTextColor(color); - matrix.setFont(&FreeMonoBold12pt7b); print_count(); }