Skip to content

Clock and Weather: a desk clock and forecast for a round touch screen - #34

Merged
bdbarnett merged 4 commits into
mainfrom
desk-clock-weather
Nov 4, 2026
Merged

bdbarnett merged 4 commits into
mainfrom
desk-clock-weather

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

Two new apps and the library they share. Clock is an analog clock that fills
the screen. Weather shows conditions and five days ahead from Open-Meteo, which
needs no account or key. deskkit joins Wi-Fi, sets the time with NTP or a web
server's Date header where NTP is blocked, follows the place's timezone and
daylight saving, moves between the apps with a swipe, returns to the clock when
idle, and turns the screen off outside the hours you choose.

Run on a LILYGO T-RGB 2.1" round board: installed by the guide's commands, a
ZIP code looked up through the keypad, forecast fetched over HTTPS on the
worker thread, switching 0.8 to 1.4 s with steady free heap over four round
trips, the backlight off after a minute idle at night, a rejoin after dropping
Wi-Fi, and the clock set with NTP refused. tests/test_deskkit.py drives swipes,
idle and night hours on real LVGL, with a planted fault for each.

A finger on the real panel hasn't been checked yet, so swipes and the
long-press have only run against LVGL's input with a simulated pointer.

Two new apps and the library they share. Clock is an analog clock that fills
the screen. Weather shows conditions and five days ahead from Open-Meteo, which
needs no account or key. deskkit joins Wi-Fi, sets the time with NTP or a web
server's Date header where NTP is blocked, follows the place's timezone and
daylight saving, moves between the apps with a swipe, returns to the clock when
idle, and turns the screen off outside the hours you choose.

Run on a LILYGO T-RGB 2.1" round board: installed by the guide's commands, a
ZIP code looked up through the keypad, forecast fetched over HTTPS on the
worker thread, switching 0.8 to 1.4 s with steady free heap over four round
trips, the backlight off after a minute idle at night, a rejoin after dropping
Wi-Fi, and the clock set with NTP refused. tests/test_deskkit.py drives swipes,
idle and night hours on real LVGL, with a planted fault for each.

A finger on the real panel hasn't been checked yet, so swipes and the
long-press have only run against LVGL's input with a simulated pointer.
Setting up at a time that's night in UTC would otherwise darken the keypad a
minute in. Run with the contract's new check.
…swered

display_driver sets a 255 px gesture distance on a touch device to protect
pinches, and LVGL restarts its count whenever a touch chip repeats a position.
Most real swipes on a 480 px panel never got there, while a simulated pointer
at LVGL's default of 50 px always did. deskkit now sets 60 px, no minimum speed
and a one-second hold, so a slow swipe isn't taken for a hold either.

The contract now replays two slow swipes recorded from a CST820 on an indev set
to 255 px first, with a planted fault that leaves it untuned. Swipes and idle no
longer leave the ZIP screen, where the clock would have no timezone yet.
…ail a check

CI's MicroPython has no LVGL. The plants also counted an import crash as a catch.
@bdbarnett
bdbarnett merged commit eaada7d into main Nov 4, 2026
6 checks passed
@bdbarnett
bdbarnett deleted the desk-clock-weather branch November 4, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant