Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Clockrastinator

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).

Feature Summary

Clock page:

  • Flat card with shadow, weekday chip (left) & timezone chip (right)
  • 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:
  • 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

Hardware

Target: M5StickC Plus (ESP32‑PICO‑D4) Peripherals: AXP192 (battery + brightness), MPU6886 (IMU), BM8563 (RTC), internal buzzer (LEDC)

Architecture (FreeRTOS Tasks)

  • UiTask: draws active page, ticker (Clock only), handles buttons & page dots
  • 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 & cache
  • BuzzerTask: startup chime + short alert patterns

Persistence (NVS Keys)

  • 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)

HTTP Endpoints (Web UI)

  • 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 update

Build & Flash

  1. Install PlatformIO (VS Code extension).
  2. Connect M5StickC Plus via USB.
  3. Run the provided task “Upload firmware” (invokes platformio run --target upload).
  4. On first boot: join the AP (SSID shown) or note the STA IP at top center.
  5. Open the IP (or mDNS hostname, if set) in a browser.

platformio.ini core deps:

  • M5StickCPlus 0.1.1
  • ArduinoJson ^6.21.x

Usage & Controls

  • Btn A: cycle pages (Clock → Tasks → Pomodoro → Daily)
  • Btn B: context (scroll list / start‑pause Pomodoro / etc.)
  • Ticker speed & persisted brightness: adjust + Save
  • Live brightness: drag slider (fires POST /brightness continuously)
  • Buzzer: startup chime; short alert for due / interval triggers

Rendering Details

  • 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

Time Handling

  • Boot: read RTC → (if WiFi) NTP sync → write back RTC
  • POSIX TZ from selection (DST honored via rules)

Reliability Tactics (News & Net)

  • 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

Extensibility Ideas

  • Inline edit for Daily items
  • Battery percentage overlay
  • Additional news sources (opt‑in) with conservative fetch budgets

License

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages