Buy me a cofee: https://ko-fi.com/noscoding
PicoFetch is a high-performance system monitoring solution designed for the Raspberry Pi Pico and the Waveshare 1.3" LCD (240x240). It leverages the fastfetch utility to capture comprehensive host metrics and streams them over a serial connection to a dedicated hardware dashboard.
The system consists of two primary components:
- Host Script: A Python-based utility that gathers system data (CPU, RAM, GPU, Battery, and Thermals) using
fastfetchand transmits it via USB Serial. - Pico Firmware: A MicroPython-based driver and UI engine that renders the data in real-time across four distinct, selectable themes.
- Real-Time Telemetry: Low-latency monitoring of CPU usage, memory allocation, and GPU performance.
- Multi-Theme Interface: Integrated UI themes (Terminal, Hacker, macOS, and Windows Light Mode) with specific color palettes and layout behaviors.
- Hardware Controls: Physical theme cycling using the onboard "Key A" (GP15) button.
- Thermal & Power Management: Integrated tracking of CPU/GPU temperatures and host battery percentage.
- Robust Connection Handling: A built-in 15-second watchdog timer that triggers a visual alert upon signal loss.
- Optimized Rendering: Customized FrameBuffer implementation for the ST7789 driver with instant theme switching.
- Microcontroller: Raspberry Pi Pico or Pico 2W.
- Display: Waveshare 1.3" LCD Module (240x240 resolution, ST7789 driver).
- Host: Linux, macOS, or Windows machine with Python 3.
Ensure fastfetch is installed and accessible via your system PATH.
- Install the required Python library:
pip install pyserial
- Launch the host sync utility:
python host/picofetch_host.py
- Flash the Raspberry Pi Pico with the latest MicroPython firmware.
- Upload
pico/main.pyto the root directory of the Pico. - Reset the Pico or reconnect the USB cable to initiate the monitor.
- Switching Themes: Press the physical Key A (GP15) button on the LCD HAT to cycle through the UI modes.
- Connection Monitoring: The display will automatically show a "OFFLINE" warning if the host script stops transmitting data for more than 15 seconds.
| Signal | GPIO | Function |
|---|---|---|
| MOSI | 11 | SPI Master Out Slave In |
| SCLK | 10 | SPI Clock |
| CS | 9 | Chip Select (Active Low) |
| DC | 8 | Data / Command Control |
| RST | 12 | Hardware Reset |
| BL | 13 | Backlight Control (PWM) |
| Key A | 15 | Theme Selection Button |
- Data Protocol: JSON-encoded strings terminated by a newline character.
- Baud Rate: 115200 bps over USB CDC.
- Refresh Rate: Metrics are updated every 3 seconds to balance host performance and readability.
- Color Space: 16-bit RGB565 (Optimized for ST7789).
- No Data Displayed: Verify that
fastfetchis installed by runningfastfetch -vin your host terminal. - Serial Connection Failed: Ensure no other application (like a serial monitor or IDE) is currently occupying the Pico's COM/TTY port.
- Inverted Colors: The firmware uses
0x21for display inversion as required by the Waveshare 1.3" ST7789 module.