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>
This commit is contained in:
co-authored by
Claude Opus 4.6
commit
2611c70881
@@ -0,0 +1,12 @@
|
||||
#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
|
||||
};
|
||||
Reference in New Issue
Block a user