Objective: Develop a visually appealing graphical user interface (GUI) using the LVGL library on the Waveshare ESP32-C6-LCD-1.47 board, featuring a 1.47-inch LCD (172x320 resolution, ST7789V3 driver), programmed via Arduino IDE on Ubuntu 24.04. The GUI will display real-time HF radio propagation and solar data critical for amateur radio operators, including Sunspot Number (SN), Solar Flux Index (SFI), A-index, K-index, X-ray flux, solar wind conditions, HF band conditions (80m–10m), and recent PSKReporter spots. The design must be uncluttered, modern, and highly readable on the small display, optimized for a user new to Arduino IDE. Focus solely on implementing the GUI and data display, avoiding troubleshooting details unless essential for functionality.
Project Context:
Purpose: Provide amateur radio operators with a clear, concise display of HF propagation and solar data to assess communication conditions, supplemented by recent PSKReporter spots showing active HF contacts. The interface should aid in deciding optimal bands and times for radio operation.Data to Display:
Sunspot Number (SN): Indicates solar activity level (0–250, higher values improve HF propagation).Solar Flux Index (SFI): Measures 10.7cm solar radio flux (50–300, >150 indicates good HF conditions).A-index: Linear geomagnetic activity index (1–6 optimal, >11 disruptive to HF).K-index: Logarithmic geomagnetic activity index (0–1 ideal, >3 impacts HF, >5 severe).X-ray Flux: Ionospheric X-ray intensity (classes A, B, C, M, X; A/B best, M/X disrupt HF).Solar Wind (SW): Speed in km/s (0–1000, <400 better) and proton/electron density (affects E-layer ionization).HF Band Conditions: Status for 80m, 40m, 20m, 15m, 10m bands (e.g., Poor, Fair, Good), derived from SN, SFI, A, K, and X-ray data.PSKReporter Spots: Recent HF contacts (e.g., callsign, band, time, location) from PSKReporter API, showing active stations.Data Source: Use mock data in the sketch for simplicity (e.g., SN=120, SFI=150, A=5, K=2, X-ray=C, SW=400 km/s, HF bands=Good/Fair, sample PSKReporter spots). For future enhancement, real data can be fetched via Wi-Fi from NOAA (www.swpc.noaa.gov) (www.swpc.noaa.gov), HamQSL (www.hamqsl.com) (www.hamqsl.com), or PSKReporter API (pskreporter.info).Design Goals: Create a minimalist, modern GUI with a dark background, light text, and color-coded indicators for clarity. Ensure readability on the 172x320 display with intuitive layout, avoiding visual clutter. Use LVGL widgets (e.g., labels, tables, gauges) to present data effectively.Hardware Context:
Board: Waveshare ESP32-C6-LCD-1.47.Microcontroller: ESP32-C6, 32-bit RISC-V single-core, 160 MHz, 512KB SRAM, 4MB Flash.Display: 1.47-inch LCD (LBS147TC-IF15), 172x320 resolution, 262K colors, ST7789V3 driver, SPI interface.
SPI Pins: CS=14, DC=15, RST=21, MOSI=6, SCLK=7.Backlight: GPIO 22 (TFT_LIGHT, set HIGH to enable).Note: Non-standard 172x320 resolution requires centering within the ST7789’s 240x320 frame using a 34-pixel horizontal offset ((240-172)/2).Additional Features: RGB LED (GPIO 8), MicroSD slot, USB-C for power and programming, 2.4 GHz Wi-Fi 6, Bluetooth 5.0 (BLE) for potential data fetching.Assumption: Non-touch variant, no touch input required.Software Context:
Operating System: Ubuntu 24.04.IDE: Arduino IDE 1.8.19.Board Package: ESP32 by Espressif Systems, version 3.1.3, configured for ESP32C6 Dev Module.
Settings: CPUFreq=160, FlashMode=qio, FlashFreq=80, FlashSize=4M, UploadSpeed=921600, USB CDC On Boot=Enabled.
Configures LVGL (version 8.x) for the ST7789 driver, 172x320 resolution, and rotation 3.Creates a visually appealing GUI featuring:
Labels for SN, SFI, A-index, K-index, X-ray flux, and solar wind speed.A table or gauge for HF band conditions (80m–10m).A scrolling list or table for PSKReporter spots (mock data: callsign, band, time, location).A clean, dark-themed layout with light text, color-coded indicators, and readable fonts.Uses mock data for all displayed metrics and spots.