Multi‑function productivity + clock firmware for the M5StickC Plus featuring an LVGL‑inspired UI, task & daily reminders, Pomodoro timer, world news ticker, live brightness control, and robust offline resilience. Built with PlatformIO (Arduino + FreeRTOS on ESP32).32).
Clock page:
- Flat card with shadow, weekday chip (left) & timezone chip (right)ght)
- Large time above a divider, compact date, vertical battery bar (charging outline + bolt)
- Bottom scrolling news ticker (BBC + CNN) with cached offline fallback Tasks::
- One‑off items with staged deadline alerts (7 / 3 / 1 / 0 days before) Daily Reminders::
- Recurring items with custom hour/minute interval & enable flag Pomodoro:oro::
- Work / break phases, rounds chip, progress bar, buzzer cues System::
- Auto rotation via IMU, NTP + RTC fallback, AP provisioning + STA reconnect, mDNS host, persistent settings Extras::
- Adjustable ticker speed (1–5) and persistent display brightness (0–100) plus live (non‑persistent) brightness endpoint for smooth sliding updates
Target: M5StickC Plus (ESP32‑PICO‑D4) Peripherals: AXP192 (battery + brightness), MPU6886 (IMU), BM8563 (RTC), internal buzzer (LEDC))
- UiTask: draws active page, ticker (Clock only), handles buttons & page dotsdots
- OrientationTask: IMU sampling + debounced rotation
- WebTask: WiFi STA/AP logic, HTTP server, mDNS, endpoints
- ReminderTask: deadline stage notifications
- DailyReminderTask: recurring interval checks
- NewsTask: fetch + sanitize BBC & CNN RSS titles, merge & cachep; cache
- BuzzerTask: startup chime + short alert patterns
- tasks – newline list: id|deadlineUtc|stage|title
- daily3 – newline list: id|ivSec|last|en|title (migrates older formats)
- tzKey / tzPosix – selected timezone
- news_cache – last good concatenated headline string
- news_spd – ticker speed (1–5)
- brightness – persisted screen brightness (0–100)
- (WiFi creds stored by system)
- GET / – dashboard (timezone select, add task, tasks table, daily list/form, ticker speed, brightness slider)
- POST /add – add task (title + date)
- GET /delete?id=… – delete task
- POST /daily – add daily reminder (hours/minutes + title)
- GET /ddel?id=… – delete daily
- POST /settz – set timezone by key (country/region)
- POST /news – set ticker speed (1–5) and persisted brightness
- POST /brightness – live brightness (applies instantly; not persisted)
- GET /wifi & POST /wifi – AP provisioning / credential updatedate
- Install PlatformIO (VS Code extension).
- Connect M5StickC Plus via USB.
- Run the provided task “Upload firmware” (invokes
platformio run --target upload). - On first boot: join the AP (SSID shown) or note the STA IP at top center.
- Open the IP (or mDNS hostname, if set) in a browser.
platformio.ini core deps:
- M5StickCPlus 0.1.1
- ArduinoJson ^6.21.x
- Btn A: cycle pages (Clock → Tasks → Pomodoro → Daily)
- Btn B: context (scroll list / start‑pause Pomodoro / etc.)
- Ticker speed & persisted brightness: adjust + SaveSave
- Live brightness: drag slider (fires POST /brightness continuously)
- Buzzer: startup chime; short alert for due / interval triggers
- Weekday + TZ chips share top row; time centered above divider; date compact below
- Battery bar shows fill + markers; charging adds cyan outline + bolt
- Ticker scroll speed scales with selected (1–5); offline shows cached string or status text
- Boot: read RTC → (if WiFi) NTP sync → write back RTC
- POSIX TZ from selection (DST honored via rules)
- Short HTTP timeouts, capped streaming, minimal allocations
- DNS pre‑check + per‑host cooldowns, fallback HTTP if HTTPS fails
- Last good ticker retained for offline display
- Inline edit for Daily items
- Battery percentage overlay
- Additional news sources (opt‑in) with conservative fetch budgets
Personal / educational use. Consider verifying third‑party feed terms before redistribution.
Concise summary: a focused, resilient productivity clock with clean visuals, safe networking, and adjustable UX (ticker speed + brightness) optimized for the M5StickC Plus.