A calm, low-friction study timer for the M5Stack Cardputer.
The timer is the primary feature. Logging is a passive side effect. The intended daily flow is:
Power on
Previous timer appears
Press Enter
Start studying
CARDPUTER StudyTimer is designed to feel closer to a simple 100-yen shop timer than a productivity app.
It is intentionally standalone:
- Cardputer only
- No extra UNIT modules
- No MQTT
- No Home Assistant
- No cloud features
- No gamification
- No subject-name input
Wi-Fi and NTP are optional background helpers. The timer remains usable even if Wi-Fi, NTP, or SD logging fails.
- Fast startup with the previous timer value shown immediately
- Presets: 5, 10, 15, 25, and 45 minutes
- Manual minute input from 1 to 99 minutes
- Large remaining-time display
- Four-edge segmented progress display
- Japanese and English UI
- Sound modes: Quiet, Normal, Loud
- Low-battery visual warning at 20% or less when not charging
- Passive CSV logging to microSD
- Background Wi-Fi/NTP time sync
- No startup wait for Wi-Fi or NTP
Enter: start the previous timer1to5: start a preset0: enter a custom minute valueS: open settingsL: open stats in Rich modeV: open voice memos in Rich mode- Hold
M: record a voice memo from any screen in Rich mode
- Number keys: enter minutes
Enter: startDel: delete one digit, or return to Ready when empty
Enter: pause or resumeDel: open reset confirmation
Press S to open Language, then use fn + / and fn + , to switch between Language, Volume, and Mode in page order.
Language:
1: Japanese2: English
Volume:
1: Quiet2: Normal3: Loud
Mode:
1: Simple, timer and settings only2: Rich, stats and voice memos enabled
The default mode is Simple. CSV logging and time sync continue in the background even in Simple mode.
Controls:
fn + ,: previous settings pagefn + ;: move selection upfn + .: move selection downfn + /: next settings pageEnter: apply selected itemDel: return to Ready
In Rich mode, press L to show stats from study_log.csv on the SD card.
- today's total
- last 7 days total
- streak days
- simple 7-day bars
Synced devices use the exact NTP date. Before NTP sync, stats can still use a saved date as OFFLINE DATE when a previous sync exists. Stats still require an available SD card.
In Rich mode, hold M to record a voice memo from the built-in microphone. Recording does not stop the timer. Voice memos are saved as WAV files under /voice_memos/ on the SD card.
- Hold
M: record - Release
M: save V: open voice memo listfn + ;: previous memofn + /: next memoEnter: play or stopDel: return
Synced devices use timestamp filenames. Unsynced devices use sequential filenames.
Copy config.example.h to config.h and edit only config.h.
#define WIFI_ENABLED true
#define WIFI_SSID ""
#define WIFI_PASSWORD ""
#define NTP_SERVER_1 "pool.ntp.org"
#define NTP_SERVER_2 "time.google.com"
#define NTP_SERVER_3 "time.cloudflare.com"
#define GMT_OFFSET_SECONDS 32400
#define DAYLIGHT_OFFSET_SECONDS 0Do not commit real Wi-Fi credentials. config.h is intentionally ignored.
If Wi-Fi is not configured, the timer still works. When a previous sync date is available, completed sessions are logged as offline with a date. If no date is available, they are logged as unsynced.
Completed sessions are appended to:
/study_log.csv
Current CSV format:
date,time,sync_status,duration_min,completed,input_type
2026-05-19,13:32:52,synced,25,1,preset4
2026-05-19,14:10:12,synced,45,1,custom
2026-05-19,,offline,25,1,preset4
,,unsynced,15,1,preset3Columns:
date:YYYY-MM-DD, empty when no date is availabletime:HH:MM:SS, empty when NTP is not syncedsync_status:synced,offline, orunsyncedduration_min: timer duration in minutescompleted:1for completed sessionsinput_type:preset1topreset5, orcustom
The date and time columns are split so the Cardputer can later aggregate daily totals locally without parsing a combined timestamp string.
Target board:
m5stack:esp32:m5stack_cardputer
Required Arduino libraries include:
- M5Cardputer
- M5Unified
- M5GFX
Example compile command:
arduino-cli compile --fqbn m5stack:esp32:m5stack_cardputer .This public-ready repository intentionally tracks only:
CARDPUTER-StudyTimer.inoREADME.mdREADME.ja.mdLICENSEconfig.example.himages/.gitignore
Local notes, generated docs, private configuration, and editor files are ignored.
This project was developed with assistance from AI tools, including Codex app and GitHub Copilot.
This project is licensed under the MIT License.
Copyright (c) 2026 omiya-bonsai

