A powerful Arduino library that generates 2-digit numbers for the Arduino Uno R4's LED Matrix.
- Generate 2-digit numbers for the Arduino Uno R4's LED Matrix.
- Supports numbers from 0 to 99
- Download the library by clicking on the Latest Release link.
- Extract the downloaded ZIP file.
- Move the extracted folder to the Arduino libraries directory.
- For Windows:
Documents/Arduino/libraries/
- For macOS:
~/Documents/Arduino/libraries/
- For Linux:
~/Arduino/libraries/
- For Windows:
- Restart the Arduino IDE.
- Include the library in your Arduino sketch:
#include <ArduinoR4DigitDisplay.h>
- Include the Aruino Matrix Library and create a matrix instance:
#include "Arduino_LED_Matrix.h" ArduinoLEDMatrix matrix;
- Setup the Sketch:
void setup() { Serial.begin(115200); matrix.begin(); }
- Create the matrix frame:
uint8_t frame[8][12] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
- Create the sketch loop with the drawNumber function:
void loop(){ drawNumber(49,frame); matrix.renderBitmap(frame, 8, 12); }
#include <ArduinoR4DigitDisplay.h>
#include "Arduino_LED_Matrix.h"
ArduinoLEDMatrix matrix;
void setup() {
Serial.begin(115200);
matrix.begin();
}
uint8_t frame[8][12] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
void loop(){
drawNumber(49,frame);
matrix.renderBitmap(frame, 8, 12);
}