Arduino UNO R4 WiFi: Turn Two Official Examples into an NTP Clock on the LED Matrix
Combine two official ArduinoCore-renesas 1.6.0 examples (LED matrix text + WiFiS3 NTP) into a compiling UNO R4 WiFi shelf clock. Covers the ArduinoGraphics include-order error, the ESP32-S3 2.4 GHz radio, bridge firmware 0.6.0, and demo-only habits in the NTP example. Compiled, not uploaded. Includes a disclosed eBay affiliate link.

Arduino UNO R4 WiFi: Turn Two Official Examples into an NTP Clock on the LED Matrix
The Arduino UNO R4 WiFi has two things a classic UNO never had: a 12×8 LED matrix on the board, and an ESP32-S3 handling Wi-Fi. The nicest first project uses both, and you do not need a third-party library zoo for it. Everything below starts from Arduino's own open-source core and the two official examples that ship with it.
Sources I fetched on 25 November 2026:
- arduino/ArduinoCore-renesas, the official core for the UNO R4 boards (Boards Manager package
arduino:renesas_uno). The latest GitHub release is still 1.6.0 (published 3 June 2026). I compiled against that tag. - Its
Arduino_LED_MatrixexampleTextWithArduinoGraphics - Its
WiFiS3exampleWiFiUdpNtpClient - ArduinoGraphics, the external drawing/text library those matrix APIs need (Library Manager installed 1.1.5 for this build)
- The official UNO R4 WiFi product page and the Arduino US store listing (SKU ABX00087)
- Arduino's help article Update the connectivity module firmware on UNO R4 WiFi
- Espressif's ESP32-S3 product page, for the radio band of the module Arduino puts on this board
I compared those pages and the 1.6.0 sources against the copies I fetched for this post. I compiled the sketch below with arduino-cli for arduino:renesas_uno:unor4wifi. I did not plug an UNO R4 WiFi into the machine I wrote on, and I did not upload the sketch. Treat the runtime behaviour as untested.
Disclosure: further down I link one eBay listing for the official board. That link is an eBay affiliate link (customid=blog01); if you buy through it I may earn a commission at no extra cost to you. Check the listing yourself before you pay. The official Arduino store also sells this SKU; I include the price I saw there the same morning.
What is actually on the board
Arduino's product page describes the main MCU as a Renesas RA4M1 (Arm Cortex-M4, 48 MHz, 256 kB flash, 32 kB SRAM). The RA4M1 and the board GPIOs run at 5 V, like a classic UNO. Wi-Fi and Bluetooth come from a separate ESP32-S3 module, which the same page says can also be programmed on its own through a dedicated header. Your sketch still runs on the RA4M1 and talks to that module through the built-in WiFiS3 library.
Two practical consequences follow from that split:
- The radio is an ESP32-S3. Espressif's product page for that SoC, fetched the same morning, describes 2.4 GHz Wi-Fi (802.11 b/g/n) and Bluetooth 5 (LE). It does not describe 5 GHz Wi-Fi. A 5 GHz-only SSID is the wrong network for this board.
- The ESP32-S3 runs its own connectivity / bridge firmware. In core 1.6.0,
WiFiS3definesWIFI_FIRMWARE_LATEST_VERSIONas"0.6.0"(the same constant is still inmaintoday). The official NTP example prints"Please upgrade the firmware"whenWiFi.firmwareVersion()is older than that. Arduino's help article says to update it in Arduino IDE 2.2.1 or later via Tools > Firmware Updater.
The official store page also calls out the on-board matrix: a fully addressable 12×8 (96-point) red LED matrix, used through the Arduino_LED_Matrix API that arrives with the UNO R4 core.
Gotcha 1: include order still decides whether the text APIs exist
The first lines of the official TextWithArduinoGraphics example are a warning, and they are not decorative:
cpp
// TextAnimation works only when ArduinoGraphics is installed and used.
// ArduinoGraphics is an external library and needs to be installed using
// Library Manager.
// To use ArduinoGraphics APIs, please include BEFORE Arduino_LED_Matrix
#include "ArduinoGraphics.h"
#include "Arduino_LED_Matrix.h"
I swapped those two includes and compiled with arduino-cli against core 1.6.0 and ArduinoGraphics 1.1.5. The build failed. The errors did not mention include order:
text
error: 'class ArduinoLEDMatrix' has no member named 'textFont'
error: 'Font_5x7' was not declared in this scope
error: 'class ArduinoLEDMatrix' has no member named 'beginText'; did you mean 'begin'?
error: 'class ArduinoLEDMatrix' has no member named 'println'
error: 'class ArduinoLEDMatrix' has no member named 'endText'; did you mean 'next'?
error: 'SCROLL_LEFT' was not declared in this scope
error: 'class ArduinoLEDMatrix' has no member named 'endDraw'
The official-order version of that same tiny sketch compiled cleanly. If you see no member named 'textFont' or endText, check the include order first, and confirm ArduinoGraphics is installed.
Gotcha 2: the NTP example is a demo, not a clock
WiFiUdpNtpClient is a good protocol walkthrough, but three things make it a poor base for a board that sits on a shelf:
- It opens with
while (!Serial);and a comment that this wait is needed for a native USB port. That is fine at your desk. It is the wrong default for a board running from a USB charger with no serial monitor attached. loop()calls the time server,delay(1000)to wait for a reply, thendelay(10000)before asking again. The sketch is stalled indelay()almost the entire time.- The time server is a hard-coded address,
IPAddress timeServer(162, 159, 200, 123);, even though the comment sayspool.ntp.org. In the 1.6.0WiFiUdp.h,WiFiUDP::beginPacket()has an overload that takesconst char *hostand a port, so you can pass"pool.ntp.org"directly.
The combined sketch
This keeps the official examples' structure and fixes the points above. It syncs once at boot, re-syncs every 10 minutes, keeps time with millis() in between, and scrolls HH:MM across the matrix. Compiled today against core 1.6.0 it reported: Sketch uses 70460 bytes (26%) of program storage space. Global variables use 10400 bytes (31%) of dynamic memory, leaving 22368 bytes for local variables. Maximum is 32768 bytes.
R4MatrixClock.ino:
cpp
// UNO R4 WiFi: NTP time scrolled on the 12x8 LED matrix.
// Built from two official examples in arduino/ArduinoCore-renesas:
// libraries/WiFiS3/examples/WiFiUdpNtpClient
// libraries/Arduino_LED_Matrix/examples/TextWithArduinoGraphics
#include "ArduinoGraphics.h" // must come BEFORE Arduino_LED_Matrix.h
#include "Arduino_LED_Matrix.h"
#include <WiFiS3.h>
#include "arduino_secrets.h"
const long UTC_OFFSET_SEC = 8L * 3600; // change for your time zone
const unsigned long RESYNC_MS = 10UL * 60 * 1000;
ArduinoLEDMatrix matrix;
WiFiUDP Udp;
byte packetBuffer[48];
unsigned long epochAtSync = 0; // Unix seconds at last good sync
unsigned long millisAtSync = 0;
void scroll(const char *text) {
matrix.beginDraw();
matrix.stroke(0xFFFFFFFF);
matrix.textScrollSpeed(60);
matrix.textFont(Font_5x7);
matrix.beginText(0, 1, 0xFFFFFF);
matrix.println(text);
matrix.endText(SCROLL_LEFT);
matrix.endDraw();
}
bool syncNtp() {
memset(packetBuffer, 0, sizeof(packetBuffer));
packetBuffer[0] = 0b11100011; // LI, version, mode (client)
Udp.beginPacket("pool.ntp.org", 123);
Udp.write(packetBuffer, sizeof(packetBuffer));
Udp.endPacket();
unsigned long start = millis();
while (millis() - start < 2000) {
if (Udp.parsePacket() >= 48) {
Udp.read(packetBuffer, sizeof(packetBuffer));
unsigned long secs1900 = (unsigned long)word(packetBuffer[40], packetBuffer[41]) << 16
| word(packetBuffer[42], packetBuffer[43]);
epochAtSync = secs1900 - 2208988800UL;
millisAtSync = millis();
return true;
}
delay(10);
}
return false;
}
void setup() {
Serial.begin(115200);
unsigned long t0 = millis();
while (!Serial && millis() - t0 < 3000) {} // don't hang forever on a USB charger
matrix.begin();
if (WiFi.status() == WL_NO_MODULE) {
Serial.println("No WiFi module");
scroll(" NO WIFI ");
while (true) {}
}
if (String(WiFi.firmwareVersion()) < WIFI_FIRMWARE_LATEST_VERSION) {
Serial.println("Bridge firmware is older than this core expects; consider updating it");
}
while (WiFi.begin(SECRET_SSID, SECRET_PASS) != WL_CONNECTED) {
Serial.println("Retrying WiFi...");
scroll(" WIFI? ");
delay(5000);
}
Serial.print("IP: ");
Serial.println(WiFi.localIP());
Udp.begin(2390);
while (!syncNtp()) {
scroll(" NTP? ");
}
}
void loop() {
if (millis() - millisAtSync > RESYNC_MS) syncNtp();
unsigned long now = epochAtSync + (millis() - millisAtSync) / 1000 + UTC_OFFSET_SEC;
char buf[12];
snprintf(buf, sizeof(buf), " %02lu:%02lu ", (now % 86400UL) / 3600, (now % 3600UL) / 60);
scroll(buf);
}
arduino_secrets.h, in the same folder:
cpp
#define SECRET_SSID "your-2.4GHz-network"
#define SECRET_PASS "your-password"
Set UTC_OFFSET_SEC for your zone (8L * 3600 is UTC+8). There is no daylight-saving logic in this sketch. If you need a calendar-aware clock, the RA4M1's built-in RTC — which Arduino's product page also documents — is the next place to look.
Build and upload
In the IDE, install Arduino UNO R4 Boards from Boards Manager and ArduinoGraphics from Library Manager. From the command line, pin the core if you want the same bits I compiled:
bash
arduino-cli core install arduino:renesas_uno@1.6.0
arduino-cli lib install ArduinoGraphics
arduino-cli compile --fqbn arduino:renesas_uno:unor4wifi R4MatrixClock
arduino-cli upload --fqbn arduino:renesas_uno:unor4wifi -p /dev/ttyACM0 R4MatrixClock
One box-specific note, in case you hit it too: the first core install on this Linux machine failed with "checking local archive integrity" because the Boards Manager download of ArduinoCore-renesas_uno-1.6.0.tar.bz2 did not land as a complete file. Fetching the same archive from the official Boards Manager URL (https://downloads.arduino.cc/cores/staging/ArduinoCore-renesas_uno-1.6.0.tar.bz2) into the CLI staging packages directory fixed it. The SHA-256 of the file I used was 71aa5d81f9455dbc2e8977b594963494e41466a8ed439a841b9d029b4aa31c8b, which matched the package index.
The board I'd point you to
If you still need a board, this is the listing I checked this morning: Arduino UNO R4 WiFi (ABX00087) on eBay (affiliate link).
When I opened it on 25 November 2026, it was New, item specifics showed Brand: Arduino, MPN: ABX00087, and UPC: 7630049204591. It ships from Sylmar, California, United States. The seller aaawavecom showed 99.7% positive feedback from 33,386 ratings, 30-day returns with the seller paying return shipping, more than 10 available and 183 sold. The Buy It Now price was US $28.99 with free Economy Shipping; the delivery estimate to ZIP 10001 was 28 November–3 December 2026.
The official Arduino US store listed the same SKU the same morning at 20.62**, on sale from **27.50. If you just want the board and the official store will ship to you, that is the cheaper option today. I am not going to pretend otherwise. The eBay listing is still a genuine ABX00087, in the US, with free shipping and seller-paid returns.
Whichever seller you choose, check that the board is an UNO R4 WiFi — not the Minima, which Arduino's own product page describes as the lightweight sibling without this wireless module and, on the store page, as the option to look at if you want a lighter UNO R4. Many "R4 WiFi compatible" boards also exist. The official core may work on some of them; that is not something I verified.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
no member named 'textFont' / endText |
Include order, or ArduinoGraphics missing | Include ArduinoGraphics.h first; install the library |
Matrix scrolls WIFI? forever |
5 GHz-only SSID, typo, or captive portal | Use a 2.4 GHz WPA2 network |
Scrolls NTP? |
UDP port 123 blocked | Try another network or NTP host |
| Nothing at all from a USB charger | Original while (!Serial); left in |
Use the timeout version above |
| Serial says to upgrade firmware | Old ESP32-S3 connectivity firmware | Update it with Arduino's Firmware Updater |
Takeaway
The UNO R4 WiFi's best "hello world" is already in its open-source core: the matrix text example and the NTP example. Combine them, respect the include order, and fix the demo-only habits, and you get a shelf clock in about 100 lines — compiled here, not yet run on a board.
Affiliate disclosure: the eBay link above is an affiliate link (customid=blog01). Prices, stock and seller details change; I describe the listing as I saw it on 25 November 2026.