# Cheap Yellow Display (ESP32-2432S028R) reference

> Cheap Yellow Display (ESP32-2432S028R): variants, full pin map, the three free GPIOs, power, a working ESPHome config and where to find cases.

Source: https://protoship.dev/boards/cheap-yellow-display

The Cheap Yellow Display (CYD) is an ESP32 board with a 240×320 SPI touch display, SD card slot, RGB LED, light sensor and speaker output, sold as ESP32-2432S028R. Only three GPIOs are free for your own parts: IO35 (input only), IO22 and IO27; the display, touch, SD card, LED, light sensor and speaker take the rest. It runs from 5 V over USB and works in ESPHome with the `ili9xxx` display and `xpt2046` touch platforms, with the display model depending on the variant.

## Variants

| Variant | USB | Display controller | Colour setting |
| --- | --- | --- | --- |
| Original | Micro-USB | ILI9341 | Standard; ESPHome `model: ili9341`, `invert_colors: false` |
| Dual-USB (CYD2USB) | Micro-USB and USB-C | ST7789 or ILI9342, by batch | Inverted; ESPHome `model: ili9342`, `invert_colors: true`, or the MIPI SPI models `ESP32-2432S028-7789` / `-9342` |

Both carry the model number ESP32-2432S028, printed in gold on the back next to the speaker connector. Count the USB ports to tell them apart. The USB-C port of the dual-USB board has no resistors on the CC lines, so a USB-C to USB-C cable does not power it; use a USB-A to USB-C cable.

## Pin map

| Function | Pins |
| --- | --- |
| Display (HSPI) | DC 2, MISO 12, MOSI 13, SCK 14, CS 15 |
| Backlight | 21 |
| Touch, XPT2046 (own SPI) | CLK 25, MOSI 32, CS 33, IRQ 36, MISO 39 |
| RGB LED, active low | R 4, G 16, B 17 |
| Light sensor (LDR) | 34 |
| Speaker amplifier | 26 |
| SD card (VSPI) | SS 5, SCK 18, MISO 19, MOSI 23 |
| BOOT button | 0 (readable in your code) |

## Free GPIOs and connectors

- **IO35** On P3. Input only, no internal pull-ups.
- **IO22** On P3 and CN1. Pairs with IO27 for I2C.
- **IO27** On CN1, with a 10 kΩ pull-up on the board. Pairs with IO22 for I2C.
- **IO1, IO3** TX and RX on P1. Usable with care; they are the serial port used for flashing and logs.

| Connector | Pins |
| --- | --- |
| P1 | VIN, TX, RX, GND |
| P3 | GND, IO35, IO22, IO21 |
| CN1 | GND, IO22, IO27, 3.3V |

IO21 on P3 is the backlight pin, so leave it alone.

## Power

From the vendor schematic: USB 5 V passes a 1N5819 diode, VIN on P1 passes an AO3401 P-MOSFET, and two AMS1117-3.3 regulators feed the ESP32 and the display separately. A CH340C handles USB serial. The seller specification gives about 115 mA at 5 V for the original board; Wi-Fi transmit peaks come on top. Flicker or random resets usually go away with another cable or supply (see [ESP32 power over USB-C](https://protoship.dev/guides/esp32-usb-c-power)).

## Working ESPHome config

The board and hardware sections of the touch demo from the CYD repository, copied verbatim (original board). The full file adds the `font`, `color`, `light`, `binary_sensor`, API, OTA and Wi-Fi blocks the lambda refers to; take it from the [repository](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/Examples/ESPHome/4-TouchDemo/yellowtft1.yaml).

```
esp32:
  board: esp32dev
  framework:
    type: arduino

# ============================================================
# Hardware related setup
#
# Setup SPI for the display. The ESP32-2432S028R uses separate SPI buses for display and touch
spi:
  - id: tft
    clk_pin: GPIO14
    mosi_pin: GPIO13
    miso_pin: GPIO12
  - id: touch
    clk_pin: GPIO25
    mosi_pin: GPIO32
    miso_pin: GPIO39

# Setup a pin to control the backlight
output:
  - platform: ledc
    pin: GPIO21
    id: backlight_pwm

# Setup the ili9xxx platform
#
# Display is used as 240x320 by default so we rotate it to 90°
#
# We print date and time wth the strftime() function, see the ESPHome documentation to
# format date and atime to your locale.
#
display:
  - platform: ili9xxx
    model: ili9341
    spi_id: tft
    cs_pin: GPIO15
    dc_pin: GPIO2
    rotation: 90
    invert_colors: false
    lambda: |-
      it.fill(id(Color::BLACK));
      it.filled_rectangle(20, 60, 120, 120, id(ha_blue));
      it.filled_rectangle(180, 60, 120, 120, id(ha_blue));
      it.print(80, 120, id(arimo96), TextAlign::CENTER, "A");
      it.print(240, 120, id(arimo96), TextAlign::CENTER, "B");

# Set up the xpt2046 touch platform
touchscreen:
  platform: xpt2046
  spi_id: touch
  cs_pin: GPIO33
  interrupt_pin: GPIO36
  update_interval: 50ms
  threshold: 400
  calibration:
    x_min: 3860
    x_max: 280
    y_min: 340
    y_max: 3860
  transform:
    swap_xy: false
```

For the dual-USB board, change the display block as the repository's README says: `model: ili9342`, no rotation, `invert_colors: true`. XPT2046 calibration differs per device, so expect to adjust the four calibration values. In the Arduino IDE the board is "ESP32 Dev Module" and TFT_eSPI needs the repository's `User_Setup.h` for your variant.

## Cases

The repository's 3dModels folder has cases, and it links Printables models [744864](https://www.printables.com/model/744864) and [793451](https://www.printables.com/model/793451) (dual-USB board). One linked Thangs case is reported with the wrong size in issue #44. Measuring and materials are in [ESP32 case](https://protoship.dev/guides/esp32-enclosure).

## Common faults

- **White screen** Wrong User_Setup.h or something on pin 21. See [ESP32 display not working](https://protoship.dev/guides/esp32-display-not-working).
- **Inverted colours** Dual-USB board; use its settings above.
- **Display, touch and SD together** The repository suggests reading touch with XPT2046_Bitbang_Slim.
- **"Wrong boot mode detected (0x13)"** Replace the EN capacitor (C4, or C5 on the USB-C version) with 1–10 µF.

## Let your agent check it

`check_project` recognises the CYD in a repo or ESPHome file and flags a sensor wired to a pin the display, touch or SD card already uses. Connect the Protoship MCP server once:

```
claude mcp add --transport http protoship https://mcp.protoship.dev
codex mcp add protoship --url https://mcp.protoship.dev
```

An agent without MCP calls `GET https://protoship.dev/api/check?url=…` with the link to your repo or config file.

## Questions

### Which GPIO pins are free on the Cheap Yellow Display?

IO35 (input only, no pull-ups), IO22 and IO27, on connectors P3 and CN1. IO22 and IO27 together work for I2C. IO1 and IO3 on P1 are the serial port and only usable with care.

### Which ESPHome display model does the CYD use?

The original micro-USB board uses ili9341 with invert_colors false. The dual-USB board uses ili9342 with invert_colors true per the CYD repository, or the MIPI SPI models ESP32-2432S028-7789 or ESP32-2432S028-9342, depending on the batch.

### Why does my CYD not power on from a USB-C charger?

The dual-USB board's USB-C port has no resistors on the CC lines, so a USB-C to USB-C cable gives it no power. Use a USB-A to USB-C cable.

### What board do I select for the CYD in the Arduino IDE?

ESP32 Dev Module. If uploads fail, lower the upload speed to 115200 and install the CH340 driver.

[Finish my build](https://protoship.dev/finish#request) [Let your agent check your project](https://protoship.dev/guides/esp32-device-built-by-ai-agent#connect)

## Sources

Read on 4 November 2026.

- [witnessmenow/ESP32-Cheap-Yellow-Display (CYD repo)](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display)
- [CYD repo: PINS.md](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/PINS.md)
- [CYD repo: cyd.md (CYD2USB, colour fix, CC resistors)](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/cyd.md)
- [CYD repo: TROUBLESHOOTING.md](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/TROUBLESHOOTING.md)
- [CYD repo: SETUP.md](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/SETUP.md)
- [CYD repo: DisplayConfig/User_Setup.h (original board)](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/DisplayConfig/User_Setup.h)
- [CYD repo: DisplayConfig/CYD2USB/User_Setup.h](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/DisplayConfig/CYD2USB/User_Setup.h)
- [CYD repo: vendor schematic ESP32-2432S028-MCU](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/tree/main/OriginalDocumentation/5-Schematic)
- [CYD repo: seller specification ESP32-2432S028](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/tree/main/OriginalDocumentation/2-Specification)
- [CYD repo: ESPHome examples README (USB-C version)](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/Examples/ESPHome/README.md)
- [CYD repo: ESPHome touch demo yellowtft1.yaml](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/Examples/ESPHome/4-TouchDemo/yellowtft1.yaml)
- [CYD repo: 3dModels folder](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/tree/main/3dModels)
- [Printables model 744864 (CYD case)](https://www.printables.com/model/744864)
- [Printables model 793451 (CYD2USB case)](https://www.printables.com/model/793451)
- [CYD repo issue #44: case model with the wrong size](https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/issues/44)
- [ESPHome: MIPI SPI display models](https://esphome.io/components/display/mipi_spi/)
- [ESPHome: XPT2046 touchscreen](https://esphome.io/components/touchscreen/xpt2046/)
