I would like to share a small educational project I created for the Arduino UNO Q platform.
The goal was to build a simple end-to-end example demonstrating the dual-core architecture of UNO Q:
Linux → Bridge → STM32 → LED Matrix
Linux → WebUI (Binary Clock)
The project shows how to:
• use Linux system time as the single time source
• send periodic updates to the STM32 via Bridge RPC
• display a digital clock on the LED matrix
• build a WebUI binary clock using the WebUI brick
The WebUI allows starting and stopping the matrix display, and the architecture clearly separates Linux logic from STM32 rendering.
I tried to keep everything simple and beginner-friendly.
8. In the sketch, please change the comments from French to English.
9. In the script, please put cocmment for every line in English.
10. If possible, show GMT and keep option for adding +/- hrs:min to show the local time.
11. It would be easier for readers to understand your sketch/script if you could kindly describe the workflow, either in textual form or with a simple flow diagram.
Thank you very much. I hope you will be able to spare some time to implement the options described in #2, as this would make an excellent practical experiment to present to my students.
I have already implemented some of the requested improvements.
At the moment I don’t have enough time to go further, but I will review your other ideas later and see which ones could be integrated in a future revision.
Thanks a lot for your quick implementation. I was very pleased to see that you included the 8×13 LED matrix to display the time. I have been looking for example code to display digits on the LED matrix of the UNO Q, and your sketch will be very helpful for me to tailor it to my own requirements particularly in displaying DS3231's time.
I have just downloaded this and tested on my UNO Q 2GB and it ran fine. The matrix shows the time and turns on and off when using the buttons. The binary clock also simultaneously appears on the web page. However, there is problem in that the time is one hour forward from the current time.
I am in the UK so GMT0. The Linux time on the UNO Q is correct:
$ date
Fri Feb 20 01:52:31 PM UTC 2026
At the same time, the matrix shows:
14:52
Not sure why its doing that as we are not in summer time yet so there should be no time difference with UTC?
I’ve updated the repo to make the timezone configurable from the WebUI.
Could you please pull the latest version, open the WebUI, click “Detect my timezone”, and tell me if:
the displayed time (matrix + web page) matches your local time, and
/api/timezone shows your detected timezone (e.g. Europe/London, Asia/Dhaka, etc.)?
If it still differs, please tell me your city/timezone and the output of date on the UNO Q.
Detect my timezone worked fine for me. Clicking that button changed it to Europe/London and the time displayed then matched the Linux time on the UNO Q. I tried a couple of other time zones and the time changed accordingly.
I wonder whether there could be a call to _get_tz() on first startup so that it automatically configures itself to the users timezone? However, I notice that it does remember the timezone once it has been set which is a nice touch.
BTW, I also discovered that double-barrelled city names like "New York" needed an underscore, i.e. America/New_York.
Woo! Super!! It works so cool for my local time. Thanks a lot. I can make a fantastic Lab Experiment for my students as well as as a Lecture for theory class.
2.
What do you think of giving different color for the unit digits of WebUI dashboard - like:
I’ve just updated the repository with all the requested improvements:
• different colors for unit digits
• automatic scaling to fit any screen size
• selectable 24-hour / 12-hour display
• date shown on the same line as the time
• timezone detection still available
Please pull or download the latest version of the repo, run it again on your UNO Q, and let me know how it looks on your system.
I hope this will be useful for your lab experiments and lectures
It could, but I would prefer the consistency of displaying 6 digits rather than having the leading 1 or 2 disappearing and re-appearing. I guess it doesn't really doesn't matter that much so long as the display doesn't shift position when it it changes from 0 to 1 and back again to zero.
I have downloaded the latest update. However, unfortunately the WiFi seems to have died on my UNO Q. Although I can upload the ZIP file using adb, I can no longer access the web page so am unable to do any further tests.
Seems you have done quite lot of good work on this today.
This is great. I am running a python3 script outside AppLab and both this app and that script can run at the same time. So my 2gb Uno Q can be my porch camera and a handy wall clock at the same time.
One thing that surprised me was that when I switched to 12 hour clock the display changed on the web page to a 12 hour clock but the matrix display continued to display 24 hour. Was that intentional?
A 12 hour display would be advantageous as that 13 looks similar to an 8.
I have not looked at the code yet but expect there is a simple fix.
The Uno Q appears to have no problem serving both web pages. The clock interface is on port 7000 and the camera stream is on port 8000.
EDIT:
I started to look at the code. In the HTML I see the comment:
// 12h/24h toggle (WebUI only)
I think I could just make a change in the python script to subtract 12 from the hours if hours is greater than 12. I will give it a try.
2nd EDIT:
I made a change to the python script so that the LED matrix will always be sent a 12 hour time and everything else is unchanged. I did this by creating a new variable h12. The altered _tick_loop() is as follows:
def _tick_loop():
global _matrix_is_on
while True:
tz = _get_tz()
now = datetime.datetime.now(tz=tz)
y = now.year
mo = now.month
d = now.day
h = now.hour
if h>12:
h12 = h-12
else:
h12 = h
m = now.minute
s = now.second
with _lock:
_state["h"] = h
_state["m"] = m
_state["s"] = s
_state["y"] = y
_state["mo"] = mo
_state["d"] = d
running = _state["running"]
if running:
_matrix_is_on = True
try:
Bridge.call("updateTime", h12, m, s)
logger.info(f"Sent time {h:02d}:{m:02d}:{s:02d} ({tz.key})")
except Exception as e:
logger.error(f"Bridge updateTime error: {e}")
else:
if _matrix_is_on:
try:
Bridge.call("clearMatrix")
logger.info("Matrix cleared")
except Exception as e:
logger.error(f"Bridge clearMatrix error: {e}")
_matrix_is_on = False
time.sleep(1)
In the README.md file, I have observed the following line in which, I think, the WebUI is driven by Linux and NOT by STM32.
A minimal end-to-end UNO Q example showing Linux ↔ Bridge ↔ STM32 ↔ WebUI integration. A simple and educational project for the Arduino UNO Q platform demonstrating :
===>
A minimal end-to-end UNO Q example showing WebUI ↔ Linux ↔ Bridge ↔ STM32 ↔ LedMatrix integration. A simple and educational project for the Arduino UNO Q platform demonstrating :
You are absolutely right to point this out — and I agree the key point that must be made clearer is that the Linux core is the center of the whole system.
In this project, Linux is the master controller: it serves the WebUI, runs the Python application, manages time logic, and drives the STM32 through Bridge RPC calls. The STM32 does not control the WebUI; it only acts as a hardware-side slave responsible for updating the LED matrix when it receives commands from Linux.
It's a careless mistake. I will correct the README to make this architecture explicit.
Regarding the new suggestion about displaying both 24-hour and 12-hour formats on the matrix, I saw the recent comments. Before updating the README, I will first update the code to implement this feature, and then document the changes accordingly.