- Role
- Sole developer, electronics, firmware and enclosure
- Year
- 2022 to 2026
- Disciplines
- Electronics and PCB design, Embedded systems and firmware, Software engineering, Product development and prototyping
- Technologies
- ESP32, FreeRTOS, MAX7219 LED matrix, DS3231 RTC, DFPlayer Mini, Rotary encoder, Telegram Bot API, Open-Meteo, Aladhan API, PlatformIO

An ESP32 clock in a handmade wooden case. It rotates the time, date, weather and prayer times on an 8x32 LED matrix, plays the azan, and is run from Telegram, including firmware updates.
The challenge
A device that sits on a desk for months has to look after itself. It needs to keep time through power cuts, recover from a bad network on its own, take new firmware without a cable, and never freeze in the middle of an animation, all on one small microcontroller.
The solution
- Seven FreeRTOS tasks split across both cores. Network work, Telegram and the weather and prayer-time fetches run on core 0, so a TLS handshake can never stall the display on core 1. Every task that matters is watched by the watchdog.
- Shared state goes through a small settings module and mutex-guarded strings, and logic that does not need the hardware is unit-tested on the PC under AddressSanitizer.
- Firmware updates over Telegram: the owner sends a .bin and its SHA-256, the device writes it to the inactive slot while hashing, and boots into it as pending. If it does not stay healthy for two minutes, the bootloader rolls back to the previous version.
- A DS3231 real-time clock keeps time without the network, a DFPlayer Mini plays the alarm and azan, and a rotary encoder drives an on-device menu.
- First-time setup through the device's own Wi-Fi hotspot with a random password per device. The bot token and owner are entered there, never stored in the code, and only the owner can add users or update firmware.
My contribution
Designed and built the electronics, firmware and the wooden enclosure.
Outcomes
- Built as a gift in 2022, and still improving through firmware sent over Telegram.
- Firmware updated remotely over Telegram, with automatic rollback if a new version fails.
Documentation



