Learning How to Use the Arduino UNO R4 WiFi Board

I jumped back into official Arduino boards after I saw an ad for the Arduino UNO R4 WiFi board. I have used Wemos and ESP-based devices for five years, but this new Arduino UNO R4 WiFi has an LED matrix right on the board! I am a sucker for LEDs.

Configure the Arduino IDE to Support the Arduino UNO RF WiFi Board

To use the Arduino UNO R4 WiFi board, you need to update and install some board drivers.

  • Open the Arduino IDE (from Arduino) and update to v2.3.3 or newer.
  • Go to the Boards Manager, search “Arduino UNO R4” and click INSTALL.
Arduino Boards Manager for Arduino UNO R4

Controlling the LED Matrix

I am here for the LEDs.

Here’s how to use the onboard LED matrix, which requires the LED_Matrix library. Start your sketches with “#include “Arduino_LED_Matrix.h”, create an instance, and begin it in the setup section of your code.

Here’s an animation example:

#include "Arduino_LED_Matrix.h"   
#include "animation.h"            

ArduinoLEDMatrix matrix;  

void setup() {
  matrix.loadSequence(animation);
  matrix.begin();
  matrix.play(true);
}

void loop() {
}

I learned everything that I know about this from the Arduino documentation: https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix/

The cool part is that the library includes predefined frames. You can load these, and the Arduino UNO R4 WiFi displays them without knowing how to code the frames.

#include "Arduino_LED_Matrix.h"

ArduinoLEDMatrix matrix;          

void setup() {
  matrix.begin();                 
}

void loop() {
  matrix.loadFrame(LEDMATRIX_HEART_BIG);
}

Here are the available frames in the LED_Matrix library:

  • LEDMATRIX_BLUETOOTH
  • LEDMATRIX_BOOTLOADER_ON
  • LEDMATRIX_CHIP
  • LEDMATRIX_CLOUD_WIFI
  • LEDMATRIX_DANGER
  • LEDMATRIX_EMOJI_BASIC
  • LEDMATRIX_EMOJI_HAPPY
  • LEDMATRIX_EMOJI_SAD
  • LEDMATRIX_HEART_BIG
  • LEDMATRIX_HEART_SMALL
  • LEDMATRIX_LIKE
  • LEDMATRIX_MUSIC_NOTE
  • LEDMATRIX_RESISTOR
  • LEDMATRIX_UNO

Going Further

George and I explored this new board together. We had a lot of fun trying out the examples from the Arduino documentation and experimenting on our own. You know that I will be hooking this up to CheerLights soon, but we noticed that the LEDs are only red. We will have to get creative. Then, George had an idea… He said, “Let’s make a CheerLights for emoji. Like, red could be a smiley face.” Great idea. I might just do that.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.