A tiny desk display for Codex usage and live Windows telemetry.
ESP32-C3 · 128×64 OLED · USB serial · Windows companion
QUARK pairs an ESP32-C3 SuperMini with a monochrome OLED. A lightweight Windows companion reads local PC metrics and Codex App Server usage, then sends them to the device over USB. A physical switch selects Codex or system pages; a button advances pages or requests a refresh.
- Codex: today's and lifetime tokens, seven-day token trend, five-hour and weekly allowance, usage streaks, and longest running turn.
- PC: CPU load and frequency, memory use and free memory, NVIDIA GPU load/temperature/VRAM, system-drive use/free space, network throughput, uptime, battery state when available, and a ChatGPT HTTPS reachability check.
- OLED: one clear metric or a pair of related readings per page, with line charts for changing values.
- Connection: USB reconnects automatically. A brief connection chime plays once after the selected feed is stable; temporary Codex errors keep the last readings visible until they age out.
- Status LEDs: blue for a healthy selected feed, red for offline/error, and red plus blue while connecting or refreshing. The faulty green channel is unused.
The repository contains a Windows companion, ESP32-C3 firmware, KiCad source, and fabrication exports. The companion and firmware source identify themselves as version 1.2.0; the latest published GitHub release is v1.1.0. This audit rebuilt the software and checked the CAD files, but did not perform a new hardware-in-the-loop session.
The project is an engineering prototype and personal telemetry utility. It does not claim research novelty or measured performance results. No LICENSE file is present, so reuse and redistribution terms have not been specified.
- Architecture and interfaces
- Requirements and scope
- Data collection methodology
- Hardware integration
- Verification evidence
- Traceability matrix
- Security notes
- Limitations and roadmap proposals
- Compatibility matrix
- Failure analysis and assumptions
- Hardware references
- Research sources
- Engineering evidence
- Generated artifact provenance
- AI change audit and skills registry
- Decision records
- Dependency inventory
- KiCad workflow research notes
- Repository audit summary
- Verification script and documentation checker
The HTTPS indicator only checks whether the computer can open a TCP connection to chatgpt.com on port 443. It helps distinguish a general network problem from a Codex App Server problem; it does not prove that Codex authentication or usage requests are working.
- Tokens today, with lifetime tokens in the footer.
- Seven-day token trend, normalized to the busiest day in that period, with the peak count.
- Five-hour allowance remaining and its reset estimate.
- Weekly allowance remaining and its reset estimate.
- Current and longest usage streak.
- Longest running Codex turn.
- CPU load and current frequency.
- Memory used and available memory.
- GPU load and temperature.
- GPU memory use.
- System-drive use and free space.
- Download and upload rates with separate trend charts.
- ChatGPT HTTPS reachability, system uptime, and battery state when available.
NVIDIA GPU readings require nvidia-smi; they show -- when that tool or a supported GPU is unavailable. CPU temperature is not reported because Windows' standard psutil interface does not provide it reliably.
The carrier PCB is designed for an ESP32-C3 SuperMini 2×8 module and an SH1106 128×64 OLED.
| Part | ESP32-C3 GPIO |
|---|---|
| OLED SDA | 0 |
| OLED SCL | 1 |
| Page/refresh button | 3 |
| Status LED red | 4 |
| Passive piezo buzzer | 5 |
| Codex/System switch | 6 |
| Status LED blue | 10 |
The button and switch use INPUT_PULLUP and should connect to GND when closed. Use current-limiting resistors for the red and blue LED channels. GPIO 7's faulty green channel is not used.
The KiCad schematic, PCB, BOM, previews, Gerbers, and drill files are in hardware/QUARK_SuperMini_Carrier.
Build the standalone executable with Python 3.12:
.\scripts\build_exe.ps1Install it, add it to the current Windows user's Startup folder, and launch it:
.\scripts\install_startup.ps1The companion detects the QUARK serial device, reconnects after unplug/replug, and keeps PC telemetry running while Codex data is unavailable. Rotating diagnostic logs are stored in %LOCALAPPDATA%\QUARK\quark.log.
To remove the startup shortcut:
.\scripts\remove_startup.ps1Codex pages require the Codex CLI to be installed and signed in for the same Windows user. PC pages work independently. For diagnostics, run py -3.12 .\quark.py --self-test; list serial ports with py -3.12 .\quark.py --list-ports.
- Install the Arduino ESP32 core 3.x and the U8g2 library.
- Open
QUARK.inoin Arduino IDE and select an ESP32-C3 board. - Enable USB CDC On Boot.
- Upload the sketch and close Serial Monitor before the companion connects.
The sketch uses U8G2_SH1106_128X64_NONAME_F_HW_I2C. Change the constructor if your OLED uses another controller. The companion does not flash the board.
Messages are newline-terminated ASCII at 115200 baud. Values unavailable on the current computer are sent as --.
AI|TODAY=18.4K|LIFE=1.42M|H5=74|WEEK=61|H5R=2h14m|WR=3d4h|PEAK=4.2K|STREAK=3|BEST=12|LONGEST=2h14m|D7=0,10,38,22,100,56,64
SYS|CPU=42|GPU=68|RAM=57|TEMP=71|VRAM=36|DISK=62|FREE=14.2G|DFREE=215G|DN=1.2M|UP=84K|DNP=24|UPP=3|FREQ=3.6G|SYSUP=3d4h|BAT=87|AC=ON|WEB=OK
The ESP32 answers PING with PONG for device discovery. It also accepts MODE|AI, MODE|SYS, REFRESH|AI, and REFRESH|SYS.
With Arduino CLI and the required ESP32 core and U8g2 library installed:
arduino-cli compile --fqbn esp32:esp32:esp32c3:CDCOnBoot=cdc .Run the canonical Windows verification workflow with Python 3.12:
py -3.12 -m pip install -r requirements.txt -r requirements-build.txt
.\scripts\verify.ps1To include a local ESP32-C3 firmware compile, install Arduino CLI, the ESP32 core and U8g2, then run .scripts�erify.ps1 -IncludeFirmware. KiCad ERC/DRC checks use the commands in the hardware README and are not part of the default script.
See CONTRIBUTING.md for the repeatable build and review workflow, and SECURITY.md for vulnerability reporting. Citations for version 1.2.0 are described in CITATION.cff. The project has no declared license yet.
QUARK.ino ESP32-C3 firmware and OLED UI
quark.py Windows telemetry/Codex companion
tests/test_quark.py Python unit and protocol regression tests
scripts/ Windows packaging and startup scripts
hardware/QUARK_SuperMini_Carrier/ KiCad design, BOM, and fabrication files
docs/ Architecture, verification, security, and audit docs
.github/ CI and dependency update configuration