Source: https://mokxi.com/libraries/arduino-led-matrix
Updated: 2026-11-02

Libraries / LEDs
Arduino library · LEDs

# Arduino_LED_Matrix: the Uno R4 WiFi’s 12 by 8 LEDs

The Arduino Uno R4 WiFi has a grid of 96 red LEDs on the board itself, 12 columns by 8 rows, and Arduino_LED_Matrix is the library its core includes for drawing on it. Nothing needs installing: select the Uno R4 WiFi board and the header is there. On the Uno R4 Minima, which has no matrix, the header does not exist.

Open the example in the editor See the calls

Built in on Mokxi: #include <Arduino_LED_Matrix.h> and it builds, with nothing to install. Free, and no account needed.

## What Arduino_LED_Matrix (Uno R4 core) does

The LEDs are charlieplexed on eleven pins, so a picture is never on all at once. The library lights them a few at a time from a timer interrupt, fast enough to look steady, which is why you should always draw through it rather than toggling the pins yourself.

A picture can be given two ways. renderBitmap() takes a plain 8 by 12 array of ones and zeros, easy to type by hand. loadFrame() takes three 32-bit numbers, the compact form Arduino’s online LED Matrix Editor exports, along with whole animations you play with loadSequence() and play().

Library Manager name | Arduino_LED_Matrix (Uno R4 core)

Author | Arduino

Include | #include <Arduino_LED_Matrix.h>

Boards | Arduino Uno R4 WiFi

In the simulator | Simulated: it runs against the part the way it does on the bench.

## Install it

It builds on Arduino Uno R4 WiFi.

In Mokxi it is built in: #include <Arduino_LED_Matrix.h> and the sketch compiles, with no download, no zip and no Library Manager.

On a real board it comes with the board package (Arduino), so the Arduino IDE has it as soon as the board is installed: there is nothing to add from the Library Manager.

Arduino Uno R4 WiFi

## The calls you will use

In the order a sketch meets them.

### ArduinoLEDMatrix matrix

The board’s matrix. There is only one, so one object.

### matrix.begin()

Starts the timer that keeps the LEDs lit. Call it once in setup().

### matrix.renderBitmap(frame, 8, 12)

Shows an 8 by 12 array where each element is 1 for on and 0 for off, row by row from the top left.

### matrix.loadFrame(heart)

Shows a frame of three uint32_t values, 96 bits, as the LED Matrix Editor exports it.

### matrix.loadSequence(animation)

Loads an animation: an array of frames, each three words of LEDs and a fourth giving how many milliseconds to show it.

### matrix.play(true)

Plays the loaded sequence, looping when passed true. sequenceDone() tells you when a one-shot sequence has finished.

### matrix.clear()

Turns every LED off.

## Example: Uno R4 WiFi heart

On the Arduino Uno R4 WiFi. It runs in the browser exactly as printed.

sketch.ino · Arduino Uno R4 WiFi

Open it in the editor, wired and ready to run · Uno R4 WiFi heart: the project page

## Common errors and how to fix them

### fatal error: Arduino_LED_Matrix.h: No such file or directory

The selected board is not the Uno R4 WiFi. Choose Arduino Uno R4 WiFi under Arduino UNO R4 Boards; the Uno R4 Minima and the classic Uno have no matrix and no such header.

### The picture is drawn sideways or squashed

renderBitmap() expects 8 rows of 12 columns. Declare the array as [8][12], not [12][8], and pass 8 and 12 in that order.

### An animation shows one frame and stops

play() without an argument plays the sequence once. Call matrix.play(true) to loop it, and do not call loadFrame() afterward, which replaces the sequence.

## Keep going

### Learn

- Arduino Uno R4 WiFi Pinout: Every Pin and Its Limits

### More leds libraries

- Adafruit NeoPixel
- FastLED

Every built-in library · Open the editor

## Try Arduino_LED_Matrix (Uno R4 core) without installing anything

Open the example, change the sketch, and keep your version in a free account.

Start building free

Open the editor
