https://github.com/0015/pixel-clock
a minimalist digital clock UI built using LVGL v9 on the ESP32-P4
https://github.com/0015/pixel-clock
esp-idf esp32-p4 grid-layout lvgl-esp32 pixel-clock pixelart thatproject tiles
Last synced: 11 months ago
JSON representation
a minimalist digital clock UI built using LVGL v9 on the ESP32-P4
- Host: GitHub
- URL: https://github.com/0015/pixel-clock
- Owner: 0015
- License: mit
- Created: 2025-04-15T06:45:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-15T07:15:07.000Z (about 1 year ago)
- Last Synced: 2025-06-25T05:19:29.124Z (11 months ago)
- Topics: esp-idf, esp32-p4, grid-layout, lvgl-esp32, pixel-clock, pixelart, thatproject, tiles
- Language: C
- Homepage: https://youtu.be/3jm2NcqW0pY
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pixel Clock
**Pixel Clock** is a minimalist digital clock UI built using **LVGL v9** on the **ESP32-P4**.
It displays pixel-style digits over a grid layout and includes a hidden snake animation mode to bring life to your embedded screen — all optimized for real-time performance and ease of integration.
> Designed for LVGL-ready environments. Just configure your display and grid, and you're ready to run.
---
## Features
- **Pixel-style digits** using a 3×5 font layout on a tile grid
- **Blinking colon** that toggles every second
- **Optimized redraw** — updates only the digits that change
- **Tap interaction** — trigger random colorful falling tiles
- **Snake game mode**:
- Triggers randomly during idle
- Green snake moves toward red tile
- Snake disappears on contact, restoring clock UI
---
## Built With
- **ESP32-P4** (ESP-IDF framework)
- **LVGL v9**
- Modular C code
- Simple grid logic (19×9 by default)
---
## Project Structure
```plaintext
main/
├── include/
│ ├── digit_font.h
│ ├── global.h
│ └── snake.h
├── ui_resources/
│ ├── digit_font.c
│ ├── global.c
│ └── snake.c
├── main.cpp
```
---
## Screenshots & Demo
*(Add your screenshots or YouTube demo link here)*
---
## Customization
- Adjust grid resolution:
```c
#define GRID_ROWS 9
#define GRID_COLS 19
```
- Modify fonts in `digit_font.h`
- Change snake speed, style, or colors in `snake.c`
- Use LVGL’s animation features to add your own flair
---
## Requirements
- ESP32 board (This project was tested on the ESP32-P4 board.)
- Display compatible with LVGL (800×1280 tested)
- Optional: GT911 capacitive touch panel
---
## License
MIT License
(c) 2025 Eric Nam
---
*Simple. Playful. Pixel-perfect.*