Agrego tipografia para 4 digitos
This commit is contained in:
parent
d714e31e7f
commit
a44208f850
@ -1,6 +1,7 @@
|
||||
#include <Adafruit_GFX.h>
|
||||
#include <Adafruit_NeoMatrix.h>
|
||||
#include <Adafruit_NeoPixel.h>
|
||||
#include <Fonts/FreeMono9pt7b.h>
|
||||
#include <Fonts/FreeMonoBold12pt7b.h>
|
||||
|
||||
|
||||
@ -54,12 +55,26 @@ uint8_t reset_release;
|
||||
|
||||
void print_count()
|
||||
{
|
||||
matrix.fillScreen(0);
|
||||
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.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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user