Files
clawdmeter/firmware/src/data.h
T
Hermann Björgvin HaraldssonandClaude Opus 4.6 2611c70881 Initial commit: Claude Usage Tracker for Panlee SC01 Plus
Physical desk monitor that displays Claude Code usage limits (5-hour session
and 7-day weekly utilization) on an ESP32-S3 touchscreen via USB serial.

Firmware: LVGL 9 dashboard with LovyanGFX on SC01 Plus, Anthropic brand
colors and custom fonts (Tiempos, Styrene B, DejaVu Sans Mono), Claude
spinner animation with rotating status words.

Daemon: Pure bash script that reads the Claude Code OAuth token, makes a
minimal Haiku API call, extracts usage from rate-limit response headers,
and sends JSON to the ESP32 over serial. Uses inotifywait for instant
USB plug/unplug detection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 02:37:11 +00:00

13 lines
484 B
C

#pragma once
#include <Arduino.h>
struct UsageData {
float session_pct; // 5-hour window utilization (0-100)
int session_reset_mins; // minutes until session resets
float weekly_pct; // 7-day window utilization (0-100)
int weekly_reset_mins; // minutes until weekly resets
char status[16]; // "allowed" or "limited"
bool ok; // data parse succeeded
bool valid; // false until first successful parse
};