Skip to content

A Simple Arduino Library for Displaying 2-digit Numbers to the Arduino R4's LED Matrix

Notifications You must be signed in to change notification settings

ryland-goldman/Arduino_Uno_R4_2_Digit_Display

 
 

Repository files navigation

Arduino Uno R4 LED Matrix 2-Digit Number Library

Latest Release

A powerful Arduino library that generates 2-digit numbers for the Arduino Uno R4's LED Matrix.


Table of Contents


Features

  • Generate 2-digit numbers for the Arduino Uno R4's LED Matrix.
  • Supports numbers from 0 to 99

Installation

  1. Download the library by clicking on the Latest Release link.
  2. Extract the downloaded ZIP file.
  3. Move the extracted folder to the Arduino libraries directory.
    • For Windows: Documents/Arduino/libraries/
    • For macOS: ~/Documents/Arduino/libraries/
    • For Linux: ~/Arduino/libraries/
  4. Restart the Arduino IDE.

Usage

  1. Include the library in your Arduino sketch:
    #include <ArduinoR4DigitDisplay.h>
  2. Include the Aruino Matrix Library and create a matrix instance:
    #include "Arduino_LED_Matrix.h"
    ArduinoLEDMatrix matrix;
  3. Setup the Sketch:
    void setup() {
       Serial.begin(115200);
       matrix.begin();
    }
  4. 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 }
     };
  5. Create the sketch loop with the drawNumber function:
    void loop(){
     drawNumber(49,frame);
     matrix.renderBitmap(frame, 8, 12);
    }

Examples

#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);
}

About

A Simple Arduino Library for Displaying 2-digit Numbers to the Arduino R4's LED Matrix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.1%
  • C 0.9%