UNO Q Binary Clock – WebUI + LED Matrix + Bridge demo

Hello everyone,

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.

Here is the full project:

:backhand_index_pointing_right: https://github.com/philippe86220/uno-q-webui-binary-clock-matrix

Below is a screenshot of the WebUI binary clock:

I hope this example can help newcomers understand how the UNO Q Linux side, Bridge RPC, and STM32 interact.

Any feedback or suggestions are welcome :slightly_smiling_face:

Best regards

1.

I have down loaded you zip file and have imported in my newly created app. Everything looks working fine.

Congratulation!

2.
Reading your system and will come with more queries in due time.

In the meantime, I have a few observations:

3.

==> dual-processor architecture of UNO Q (as MPU is a four-core processor)?

4.

What is the definition of Linux system time?
How often MPU sends time (at every seconds) to MCU?

5.

Could be simple but NOT basic!

6. I would like to see the positional weights on WebUI Clock like:

7.
Stop Matrix
==> Sleep Matrix

Start Matrix
==> Resume Matrix

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 for your feedback and kind words :slightly_smiling_face:

You are right, technically it is a dual-processor architecture (STM32 + Linux MPU).

The Linux system time comes from the standard Linux clock synchronized via NTP, and the Python loop sends updates once per second to the STM32.

Your suggestions about positional weights and GMT options are very interesting ideas for future improvements.

I will update the comments to English in the next revision.

Best regards

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 again for your interest in the project.

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.

@GolamMostafa

Could you tell me your timezone ? so I can configure the clock correctly?

GMT + 6 (Dhaka, Bangladesh)

Make it variable GMT + local time zone; so that anyone from any country can display his local ime.

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?

BTW, I downloaded and ran it after your post #5.

Other that that it works OK.

Hi,

@GolamMostafa , @BitSeeker

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:

  1. the displayed time (matrix + web page) matches your local time, and

  2. /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.

Best regards,
Philippe

PS : List of tz database time zones - Wikipedia

You can also try other timezones if you want to verify that everything works correctly.

A complete list of valid timezones (IANA format) is available here:
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

For example you can test:

  • Europe/London

  • Asia/Tehran

  • Asia/Dhaka

  • Africa/Algiers

  • America/New_York

Just enter the name in the WebUI or use “Detect my timezone”, then check if the displayed time matches your local time.

Please let me know your results :slightly_smiling_face:

Best regards,
Philippe

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.

The demo works nicely. Thank you.

1.

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:

3.
Also, the WebUI does not fit in the page of the Monitor. It should fit virtually in all kinds/sizes of Monitors.

4.
What about putting an option for 24-hrs/12-hrs clock? Also adding calendar along the Time line. 22:32:33 20 February 2026

Hi,

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 :slightly_smiling_face:

Best regards,
Philippe

Well done!

And yet, the calender could be of diffreent color.

The leading zero of houd field (01, 02, ) could be deleted.

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)

Make sense.

@philippe86220

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.