Skip to content

Seeed sensecap indicator support#2568

Open
themelisx wants to merge 58 commits into
meshcore-dev:devfrom
themelisx:meshcore_seeed_sensecap_indicator
Open

Seeed sensecap indicator support#2568
themelisx wants to merge 58 commits into
meshcore-dev:devfrom
themelisx:meshcore_seeed_sensecap_indicator

Conversation

@themelisx
Copy link
Copy Markdown

Adds a working MeshCore client variant for the Seeed SenseCap Indicator (ESP32-S3, 480×480 RGB LCD, SX1262 LoRa, FT5x06 capacitive touchscreen).

Hardware challenges solved
The SenseCap Indicator has an unusual hardware topology that required custom solutions:

SX1262 via TCA9535 I2C IO Expander
The SX1262's control signals (NSS, RESET, BUSY, DIO1) are not connected to ESP32-S3 GPIO directly — they route through a TCA9535 I2C IO expander at address 0x20. A custom RadioLib HAL (SenseCapHAL) was written to route all digitalWrite/digitalRead calls for those pins through I2C, while using bit-bang SPI on the FSPI data lines (GPIO 41/47/48) to avoid conflicting with the LCD_CAM peripheral used by LovyanGFX.

Shared I2C bus (TCA9535 @ 0x20 + FT5x06 touch @ 0x48)
Both the radio HAL and the LVGL touch callback share Wire. A SemaphoreHandle_t mutex (g_i2c_mutex) is created before radio_init() and passed to both users so they never collide.

ST7701 display orientation
The default lgfx::Panel_ST7701 init sequence leaves the display blank on the SenseCap Indicator because it doesn't apply the required MADCTL (vertical flip) and SDIR (horizontal flip) commands. A subclass Panel_SCIndicator overrides getInitCommands() to inject these extra commands, ported from the Meshtastic LGFX_INDICATOR.h reference.

I2C bus recovery
After LovyanGFX's lcd.begin() finishes the ST7701 init (which uses the same I2C bus for the TCA9535 chip-select), the I2C bus can be left in a stuck state. A 9-clock SCL recovery sequence with explicit STOP condition is run at the start of radio_init() before re-initializing Wire at 400 kHz.

Touch rotation
The FT5x06 reports coordinates in portrait orientation; offset_rotation = 2 (180°) is applied to align the touch coordinates with the landscape display, matching the Meshtastic reference implementation.

ST7701 chip-select via expander
pin_cs for the ST7701 panel is 4 | IO_EXPANDER (TCA9535 bit 4); LovyanGFX bit-bangs this only during lcd.begin(), so there is no runtime conflict with the FSPI radio SPI.

UI
Uses the simple_secure_chat_ui example with a full LVGL 8.3.11 touchscreen interface on the 480×480 display. Screenshots included in variants/sensecap_indicator-espnow/.

@themelisx themelisx changed the base branch from main to dev May 15, 2026 19:14
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.

6 participants