Skip to content

machetie/esp32-c6-linux-monitor

Repository files navigation

ESP32-C6 Linux System Monitor

License: MIT ESP-IDF Python

A real-time system monitoring dashboard that streams Linux desktop metrics (CPU, memory, disk, network, GPU) from a host computer to an ESP32-C6 device over USB CDC, displaying them on a compact 172×320 touchscreen LCD using LVGL.

Overview

This project creates a hardware system monitor that provides real-time visualization of your Linux system's performance metrics on a dedicated Waveshare ESP32-C6-Touch-LCD-1.47 module. The system uses USB CDC communication for reliable, high-speed data transfer between the host computer and the ESP32-C6, with an optimized UI for the compact portrait display.

Features

  • Real-time Metrics: CPU usage, memory consumption, disk I/O, network activity, GPU utilization
  • USB CDC Communication: Fast, reliable data transfer over USB
  • Compact Touch Display: 172×320 portrait LCD with capacitive touch (AXS5106L)
  • Optimized UI: Custom LVGL interface designed for small screen readability
  • Configurable Updates: Adjustable refresh rates and metric selection
  • Cross-platform Host: Python-based host application for Linux systems
  • Integrated Hardware: No manual wiring required - display connects via 22-pin header

Visual UI Layout

The user interface is specifically optimized for the Waveshare ESP32-C6-Touch-LCD-1.47's compact 172×320 pixel portrait display. The layout maximizes information density while maintaining excellent readability through color-coded elements and efficient spacing.

┌────────────────────┐  172px width
│   SYS MONITOR      │  ← Title (green)
│                    │
│ CPU          45.2% │  ← Label + value (cyan)
│ ████████████░░░░░░ │  ← Progress bar (green, 12px height)
│                    │
│ MEM          50.0% │  ← Memory section
│ ██████████░░░░░░░░ │  ← Progress bar (orange)
│                    │
│ DISK         75.0% │  ← Disk section
│ ███████████████░░░ │  ← Progress bar (purple)
│                    │
│ NET  ↑100 ↓200 KB/s│  ← Network (compact format)
│                    │
│ GPU          60.0% │  ← GPU usage
│                    │
│                    │
│    [Touch Ready]   │  ← Touch-enabled display
│                    │
└────────────────────┘  320px height

UI Design Highlights:

  • Compact Title: "SYS MONITOR" instead of full text to save space
  • Split Layout: Labels on left, values on right for maximum clarity
  • Color Coding: Green (CPU), Orange (Memory), Purple (Disk), Cyan (values)
  • Progress Bars: Visual representation for CPU, Memory, and Disk usage (12px height)
  • Smart Formatting: Network speeds auto-convert between KB/s and MB/s
  • Efficient Spacing: 5px margins, 8px section spacing optimized for 172px width

The UI updates in real-time as metrics are received over USB CDC, with smooth animations for progress bars and instant value updates.

Hardware Requirements

  • Display Module: Waveshare ESP32-C6-Touch-LCD-1.47 (integrated module)
    • Resolution: 172 × 320 pixels (portrait orientation)
    • LCD Driver IC: JD9853
    • Touch Controller IC: AXS5106L
    • Interface: SPI via 22-pin header (no manual wiring needed)
  • USB Cable: USB-C cable for CDC communication and power
  • Host Computer: Linux system with USB port

Note: The Waveshare ESP32-C6-Touch-LCD-1.47 is an all-in-one module where the display is integrated with the ESP32-C6 board via a 22-pin header connector. No separate ESP32-C6 board or manual GPIO wiring is required.

Software Prerequisites

Host System

  • Python 3.8 or later
  • pip package manager
  • Linux kernel 4.4+ (for modern USB CDC support)
  • Root/sudo access for USB device permissions

ESP32 Development

  • ESP-IDF v5.1 or later
  • USB drivers for ESP32-C6 (usually automatic on modern Linux)
  • CMake 3.16+
  • Git

Quick Start

1. Clone Repository

git clone https://github.com/machetie/esp32-c6-linux-monitor.git
cd esp32-c6-linux-monitor

2. Host Setup

cd host
pip install -r requirements.txt
python host_monitor.py --port /dev/ttyACM0

3. ESP32 Setup

cd esp32
. ~/esp/esp-idf/export.sh  # Source ESP-IDF environment
idf.py set-target esp32c6
idf.py build  # Pre-configured for Waveshare module
idf.py -p /dev/ttyUSB0 flash monitor

Project Structure

  • host/ - Python host application for collecting and sending system metrics
  • esp32/ - ESP-IDF firmware project for the ESP32-C6 device
  • docs/ - Comprehensive documentation including architecture and setup guides
  • .github/ - CI/CD workflows and GitHub-specific configurations

Documentation

Contributing

Contributions are welcome! Please read our contributing guidelines and submit pull requests for any improvements.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • ESP-IDF - Espressif IoT Development Framework
  • LVGL - Light and Versatile Graphics Library
  • psutil - Cross-platform system and process utilities
  • TinyUSB - USB stack for embedded systems

About

Real-time Linux system monitor for Waveshare ESP32-C6-Touch-LCD-1.47 with USB CDC communication

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published