Skip to content

ST7789 240×240

The ST7789 240×240 is a generic square color display panel based on the ST7789 controller. It communicates over SPI and provides a 240×240 pixel RGB565 framebuffer suitable for full-color dashboard layouts. This panel has no physical input controls.

CyberHUD provides a single panel definition for this board.

Quick Start

sudo ./cyberhudd -panel st7789-240x240

In your /etc/cyberhudd.json:

{
  "display": {
    "panel": "st7789-240x240"
  }
}

Display Characteristics

Property Value
Resolution 240 × 240 pixels
Color format RGB565
Controller ST7789
Interface SPI
Input None

Pin Assignments

Function GPIO Pin Notes
SPI MOSI GPIO10 SPI0 data out
SPI SCLK GPIO11 SPI0 clock
SPI CS GPIO8 SPI0 chip-select (CE0)
DC (Data/Command) GPIO25 High = data, Low = command
RST (Reset) GPIO27 Active-low reset
Backlight GPIO24 PWM-capable; high = on

SPI communication uses /dev/spidev0.0 (CE0).

Troubleshooting

CyberHUD emits detailed diagnostic logs during panel initialization. Check them with:

sudo journalctl -u cyberhudd.service -n 50

Common Issues

Symptom Likely Cause Fix
spi device ... open=error SPI not enabled on the Raspberry Pi Run sudo raspi-config → Interface Options → SPI → Enable, then reboot
Display is white/blank but backlight is on DC or RST pin not accessible, or wrong panel name Verify GPIO25 and GPIO27 are not claimed by another overlay; check panel name spelling
Colors appear inverted (BGR vs RGB) MADCTL mismatch for your panel batch Override MADCTL in JSON config to adjust color order bit
Image is offset or clipped at edges X/Y offset mismatch for your panel batch Override xOffset and yOffset in JSON config