Skip to content

Add ONX2432G028 board support - #41

Open
weiweihaoyouwei wants to merge 2 commits into
MatixYo:mainfrom
OpenNextion:add-ONX2432G028-support
Open

Add ONX2432G028 board support#41
weiweihaoyouwei wants to merge 2 commits into
MatixYo:mainfrom
OpenNextion:add-ONX2432G028-support

Conversation

@weiweihaoyouwei

@weiweihaoyouwei weiweihaoyouwei commented Jun 23, 2026

Copy link
Copy Markdown

PR Title

Add support for OpenNextion ONX2432G028

Summary

This PR adds a first-pass board target for the OpenNextion ONX2432G028 ESP32-S3 display board while keeping the original Plane Radar UI behavior intact.

The ONX2432G028 has a 2.8 inch 240x320 ST7789 SPI display, so this implementation keeps the original 240x240 circular radar view and centers it on the rectangular panel. This avoids redesigning the radar UI in the initial board-support PR.

Changes

  • Add a custom PlatformIO board definition for onx2432g028.
  • Add a PlatformIO environment for onx2432g028.
  • Add conditional display configuration for the ONX2432G028 ST7789 panel.
  • Add minimal ONX board initialization for I2C, PCF8574, LCD reset, SDCS release, and LCD backlight.
  • Keep the original circular radar UI centered in a 240x240 viewport on the 240x320 screen.
  • Keep the existing BOOT button behavior:
    • short press cycles the radar range
    • long press clears Wi-Fi/location/unit settings and reboots into setup

Build / Flash

This PR intentionally leaves the public README unchanged. If this board target is accepted, the maintainer can decide whether and how to expose it in the README.

Build the ONX2432G028 firmware with:

pio run -e onx2432g028

Flash it with:

pio run -e onx2432g028 -t upload --upload-port <PORT>

Create a merged image with:

pio run -e onx2432g028 -t merge

Hardware

Item Value
Board OpenNextion ONX2432G028
MCU ESP32-S3R8
Flash 16 MB
PSRAM 8 MB OPI PSRAM
Display 2.8 inch ST7789 SPI TFT
Resolution 240x320
Touch controller CST826, not used in this PR
I/O expander PCF8574 at 0x38
LCD reset PCF8574 EXIO6
LCD backlight GPIO6
LCD SCLK GPIO5
LCD MOSI GPIO1
LCD CS GPIO2
LCD DC GPIO3
BOOT button GPIO0

Validation

  • Builds with pio run -e onx2432g028
  • Flashes successfully on ONX2432G028 hardware
  • Device boots without panic, watchdog reset, or reboot loop
  • LCD displays the radar UI correctly
  • Wi-Fi setup flow works
  • Radar view displays and updates with ADS-B fetch logs
  • ADS-B fetch can return aircraft, for example adsb: 1 aircraft and adsb: 2 aircraft
  • BOOT short press range cycling verified
  • BOOT long press Wi-Fi reset verified
  • Photo or screenshot attached
  • Serial boot log attached

Notes

  • This PR intentionally does not add a new rectangular-screen UI layout or bottom status bar.
  • This PR does not add touch input support yet.
  • This PR does not add SD card support yet.
  • The board exposes a CST826 touch controller, but the original project currently uses the BOOT button for range/reset input.

Logs / Screenshots

Serial boot log:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x9 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0

Plane Radar
Connecting to WiFi (portal opens if needed)...
Connected: fangxiao_CH2_vpn  IP 192.168.1.190
LAN config: http://plane-radar.local or http://192.168.1.190
adsb: 1 aircraft
adsb: 1 aircraft
adsb: 1 aircraft

Radar screen photo:

main

Wi-Fi setup photo:

init wifi_manager wifi_list

BOOT short press range log:

adsb: 0 aircraft
Range: 15km (outer ~20 km)
adsb: 1 aircraft
adsb: 0 aircraft
Range: 25km (outer ~33 km)
Range: 5km (outer ~7 km)
adsb: 0 aircraft
Range: 10km (outer ~13 km)
Range: 15km (outer ~20 km)
adsb: 0 aircraft
Range: 25km (outer ~33 km)

BOOT long press reset log:

BOOT held — resetting WiFi
WiFi credentials, location, and units cleared
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x9 (SPI_FAST_FLASH_BOOT)
Saved PC:0x420bf04e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0

Plane Radar
Opening WiFi setup portal (after reset)
Setup portal: http://plane-radar.local (or http://192.168.4.1)

@weiweihaoyouwei
weiweihaoyouwei force-pushed the add-ONX2432G028-support branch from 997672e to 57e5d54 Compare July 3, 2026 09:22
@weiweihaoyouwei
weiweihaoyouwei force-pushed the add-ONX2432G028-support branch from 57e5d54 to d52b253 Compare July 3, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants