ESP32 Cheap Yellow Display (CYD) Pinout (ESP32-2432S028R)

In this guide, we’ll take a look at the ESP32 Cheap Yellow Display Pinout. We’ll see which pins are used to control the display, touchscreen, and microSD card, and which pins you have available to connect external peripherals.

ESP32 Cheap Yellow Display (CYD) Pinout (ESP32-2432S028R)

The ESP32 Cheap Yellow Display (ESP32-2432S028R) is a TFT Touchscreen display LCD with an ESP32 development board included, which is great to build graphical user interfaces for your IoT projects.

Table of Contents

Introducing the ESP32 Cheap Yellow Display – CYD (ESP32-2432S028R)

The ESP32-2432S028R development board has become known in the maker community as the “Cheap Yellow Display” or CYD for short. This development board, whose main chip is an ESP32-WROOM-32 module, comes with

  • 2.8-inch TFT touchscreen LCD
  • microSD card interface
  • RGB LED
  • built-in LDR (light-dependent resistor)
  • all the required circuitry to program and apply power to the board.
ESP32 Cheap Yellow Display CYD Board ESP32-2432S028R front

This is a very versatile board to build GUIs for your IoT projects and is much more convenient and practical than using a separate ESP32 board with a TFT screen.

ESP32 Cheap Yellow Display CYD Board ESP32-2432S028R back labeled

New to the ESP32 CYD board? Read our detailed getting-started guide: Getting Started with ESP32 Cheap Yellow Display Board – CYD (ESP32-2432S028R).

Where to buy?

You can click on the link below to check where to buy the ESP32 Cheap Yellow display and its price on different stores.

Display Pins

The TFT display communicates with the board using SPI communication protocol (HSPI). In our guides, we use the following pin assignment for the TFT display (set up in the User_Setup.h of the TFT_eSPI library).

SPI PinGPIO
MISO (TFT_MISO)GPIO 12
MOSI (TFT_MOSI)GPIO 13
SCKL (TFT_SCLK)GPIO 14
CS (TFT_CS)GPIO 15
DC (TFT_DC)GPIO 2
RST (TFT_RST)-1
Backlight PinGPIO 21

Learn more about ESP32 SPI communication: ESP32 SPI Guide with Arduino IDE

Touchscreen Pins

The touchscreen also uses SPI protocol to communicate with the ESP32. These are the VSPI pins for the touchscreen:

SPI PinGPIO
IRQ (XPT2046_IRQ)GPIO 36
MOSI (XPT2046_MOSI)GPIO 32
MISO (XPT2046_MISO)GPIO 39
CLK (XPT2046_CLK)GPIO 25
CS (XPT2046_CS)GPIO 33

RGB LED

The board comes with an RGB LED at the back that might be useful for debugging.

ESP32 Cheap Yellow Display RGB LED

Here’s the RGB LED pinout:

RGB LEDGPIO
Red LEDGPIO 4
Green LEDGPIO 16
Blue LEDGPIO 17

Important: The RGB LEDs work with inverted logic, because they are active low. This means that if you set them to HIGH = OFF and LOW = ON.

MicroSD Card Pins

ESP32 Cheap Yellow Display MicroSD Card

The microSD card uses SPI communication protocol. It uses the ESP32 default VSPI pins:

MicroSD card SPIGPIO
MISOGPIO 19
MOSIGPIO 23
SCKGPIO 18
CSGPIO 5

You may also like: ESP32: Guide for MicroSD Card Module using Arduino IDE

LDR (Light Dependent Resistor) – Light Sensor

ESP32 Cheap Yellow Display LDR (Light Dependent ResistorESP32-Cheap-Yellow-)

The board comes with an LDR at the front, right next to the display. The LDR is connected to GPIO 34.

LDRGPIO 34

Speaker

There is a 2P 1.25mm JST connector to connect a speaker. It’s controlled with GPIO 26.

SpeakerGPIO 26

BOOT and RST Buttons

ESP32 Cheap Yellow Display BOOT and Reset RST Button

It has the BOOT button which is internally connected to GPIO 0 and you also have the on-board RST (RESET) button.

BOOT ButtonGPIO 0

Extended IO

There are two extended GPIO connectors labeled P3 and CN1 on the board. In the Extended GPIO connectors, there are 4 GPIOs available: GPIO 35, GPIO 22, GPIO 21, and GPIO 27 that you can use to connect peripherals.

ESP32 Cheap Yellow Display Extended IO Connectors

P3 Extended IO

In the P3 connector, you have a GND pin and GPIO 35, GPIO 22, and GPIO 21.

Please note that GPIO 22 is also used on the CN1 connector and that GPIO 21 is used as a backlight for the display. So, as long as the backlight is on, GPIO 21 will be on.

CN1 Extended IO

In the CN1 connector, you have GND, GPIO 22, GPIO 27 and 3V3 pins. Please note that GPIO22 is also available on the P3 connector.

The pins on the CN1 connector can be especially useful to connect I2C devices because you have two available GPIOs that can be used for the I2C bus lines, and power and GND pins.

ESP32 Cheap Yellow Display Connect BME280 Sensor

If you want to use those pins to connect with I2C sensors, you need to set custom I2C pins. You cannot use the default SDA and SCL pins (GPIO 21 and GPIO 22) because GPIO 21 is used for the backlight).

Learn more about I2C communication with the ESP32: ESP32 I2C Communication: Set Pins, Multiple Bus Interfaces and Peripherals (Arduino IDE).

Available Pins to Connect Peripherals

So, in summary, you have three pins available to connect peripherals:

  • GPIO 35 — on the P3 connector
  • GPIO 22 — on the P3 and CN1 connector
  • GPIO 27 — on the CN1 connector

TX/RX Connector

ESP32 Cheap Yellow Display RX TX Serial Connector

It also has the TX/RX pins available on the connector labeled P1. These are used for serial communication and are connected directly to the CH340 (USB to serial converter).

  • GPIO 1 — TX
  • GPIO 3 — RX

Many of our readers mentioned they couldn’t use those pins to connect peripherals (that communicate via Serial, like a GPS module), but we haven’t tested that feature yet.

Wrapping Up

We hope you find this GPIO reference guide for the ESP32 Cheap Yellow Display useful. If you have more information about the CYD GPIOs, please share by writing a comment down below.

If you’re getting started with the ESP32 CYD, make sure to take a look at the following tutorials:

Learn more about the ESP32 with our resources:

Thanks for reading.



Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »
Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »

Enjoyed this project? Stay updated by subscribing our newsletter!

43 thoughts on “ESP32 Cheap Yellow Display (CYD) Pinout (ESP32-2432S028R)”

  1. I have sniffed at this gadget several times, and always come away with the feeling that there is simply too little GPIO available for it to be of any use to me. It is certainly of no use for robotics-like projects with heaps of motors, sensors, actuators and things. I haven’t bothered with detailed pin count but suspect very many GPIO pins remain inaccessible.

    Reply
  2. These devices make good clock / sensor displays.
    I have used BME280, HTU21D, AHT10, Si7021, and DS18B20 sensors successfully on I2C using the following pins:
    #define OneWirePin 27
    #define I2C_SCL 22
    #define I2C_SDA 27
    They display data, broadcast telemetry (MQTT), and post to SQL database. Using the LDR the display can automatically dim with the ambient light.
    They are also handy for remote buttons using MQTT for controlling various things like flood lights.
    The ones with the “C” connector need a capacitor across the reset button to automatically flash in the Arduino IDE. Thank you for your previous article about dealing with that problem.

    Reply
    • Correction, the DS18B20 sensor was on OneWire not I2C. I just use the same pins and connector. My devices check for the DS18B20 then each of the other sensors until it finds one. That way changing sensors only requires a reboot. I will post the code if anyone is interested in it.

      Reply
        • /*
          // Global Variables

          char SB2[7], ST2[7], SH2[7];
          float B(NAN), T(NAN), H(NAN);

          const PROGMEM char bmeLabel[] = “BME”;
          const PROGMEM char htuLabel[] = “HTU”;
          const PROGMEM char ahtLabel[] = “AHT”;
          const PROGMEM char siLabel[] = “SI”;
          const PROGMEM char dsLabel[] = “DS”;
          const PROGMEM char xxxLabel[] = “XXX”;

          const PROGMEM char bmeMsg[] = “BME280 sensor found”;
          const PROGMEM char htuMsg[] = “HTU21D sensor found”;
          const PROGMEM char ahtMsg[] = “AHT10 sensor found”;
          const PROGMEM char siMsg[] = “Si7021 sensor found”;
          const PROGMEM char dsMsg[] = “DS18B20 sensor found”;
          const PROGMEM char xxxMsg[] = “Sensor not found.”;

          BME280I2C bme;
          BME280::TempUnit tempUnit(BME280::TempUnit_Fahrenheit);
          BME280::PresUnit presUnit(BME280::PresUnit_inHg);
          Adafruit_HTU21DF htu = Adafruit_HTU21DF();
          Adafruit_Si7021 Si = Adafruit_Si7021();
          OneWire oneWire1(OneWirePin);
          DallasTemperature sensorsDS(&oneWire1);
          AHT10 aht(AHT10_ADDRESS_0X38);

          */

          void initSensors() {
          // timerWrite(Timer, 0);
          // byte addrArray[8];
          Serial.println();
          // DS18B20 sensors can be found either by search or count
          sensorsDS.begin();
          // if (oneWire1.search(addrArray)) {
          int ds1 = sensorsDS.getDeviceCount();
          // Serial.printf(“DS Sensor Count = %u\n”, ds1);
          if (ds1 > 0) {
          MQTTclient.publish(topic_D, dsMsg);
          Serial.println(dsMsg);
          strcpy(sensor, dsLabel);
          } else {
          Wire.begin(I2C_SDA, I2C_SCL); // must start wire after checking for DS18B20 sensor <== necesary because default pins are not used
          if (Si.begin()) {
          MQTTclient.publish(topic_D, siMsg);
          Serial.println(siMsg);
          strcpy(sensor, siLabel);
          } else {
          if (htu.begin()) {
          MQTTclient.publish(topic_D, htuMsg);
          Serial.println(htuMsg);
          strcpy(sensor, htuLabel);
          } else {
          if (aht.begin()) {
          MQTTclient.publish(topic_D, ahtMsg);
          Serial.println(ahtMsg);
          strcpy(sensor, ahtLabel);
          } else {
          if (bme.begin()) {
          MQTTclient.publish(topic_D, bmeMsg);
          Serial.println(bmeMsg);
          strcpy(sensor, bmeLabel);
          } else {
          strcpy(sensor, xxxLabel);
          MQTTclient.publish(topic_D, xxxMsg);
          Serial.println(xxxMsg);
          Wire.end();
          }
          }
          }
          }
          }
          Serial.println();
          }

          void readSensor() {
          // timerWrite(Timer, 0);
          if (strcmp(sensor, bmeLabel) == 0) readBME();
          else if (strcmp(sensor, htuLabel) == 0) readHTU();
          else if (strcmp(sensor, ahtLabel) == 0) readAHT();
          else if (strcmp(sensor, siLabel) == 0) readSi();
          else if (strcmp(sensor, dsLabel) == 0) readDS();
          }

          void readAHT() {
          char tmp[7];
          T = aht.readTemperature();
          H = aht.readHumidity();
          T = 1.8 * T + 32.0;
          dtostrf(T, 5, 1, tmp);
          StripSpaces(7, ST2, tmp);
          dtostrf(H, 5, 1, tmp);
          StripSpaces(7, SH2, tmp);
          }

          void readBME() {
          char tmp[7];
          bme.read(B, T, H, tempUnit, presUnit);
          dtostrf(B, 5, 1, tmp);
          StripSpaces(7, SB2, tmp);
          dtostrf(T, 5, 1, tmp);
          StripSpaces(7, ST2, tmp);
          dtostrf(H, 5, 1, tmp);
          StripSpaces(7, SH2, tmp);
          }

          void readHTU() {
          char tmp[7];
          T = htu.readTemperature();
          T = 1.8 * T + 32.0;
          dtostrf(T, 5, 1, tmp);
          StripSpaces(7, ST2, tmp);
          H = htu.readHumidity();
          dtostrf(H, 5, 1, tmp);
          StripSpaces(7, SH2, tmp);
          }

          void readSi() {
          char tmp[7];
          T = Si.readTemperature();
          T = 1.8 * T + 32.0;
          dtostrf(T, 5, 1, tmp);
          StripSpaces(7, ST2, tmp);
          H = Si.readHumidity();
          dtostrf(H, 5, 1, tmp);
          StripSpaces(7, SH2, tmp);
          }

          void readDS() {
          int tpr;
          char tmp[7];
          sensorsDS.setWaitForConversion(true);
          sensorsDS.requestTemperatures();
          //delay(40);
          T = sensorsDS.getTempFByIndex(0); // first sensor found
          dtostrf(T, 5, 1, tmp);
          StripSpaces(7, ST2, tmp);
          }

          Reply
          • I forgot to include this function used in the above.

            void StripSpaces(int len, char* output, char* input) {
            // accept either byte or char
            int j = 0;
            for (int i = 0; i < len; i++) {
            if (input[i] != 32) {
            if(input[i] == 0) break;
            output[j] = char(input[i]);
            j++;
            }
            output[j] = 0;
            }
            input[len-1] = 0;
            }

            Of course, you may not need both floating point and text versions of the data so you could just delete those parts.

          • Sorry, I also forgot the library includes:

            #include <Wire.h>
            #include <BME280I2C.h>
            #include <Adafruit_HTU21DF.h>
            #include <Adafruit_Si7021.h>
            #include <OneWire.h>
            #include <DallasTemperature.h>
            #include <AHT10.h>

  3. There is a branch of TFT_eSPI that has been modified for 2 SPI busses. I have been using it in all my projects. I especially like being able to use the touch_calibrate function from the demo. It provides fast concise calibration for each display. I wish Bodmer would adopt this for the master version.
    You can find it here:
    github.com/maxpautsch/TFT_eSPI

    The following lines need to be in the USER_SETUP file:
    #define SOFTSPI // Uncomment for software SPI
    #define TOUCH_CS 33 // Chip select pin (T_CS) of touch screen
    #define TOUCH_MOSI 32 // Separate Touch SoftSPI bus
    #define TOUCH_MISO 39 // Separate Touch SoftSPI bus
    #define TOUCH_CLK 25 // Separate Touch SoftSPI bus
    #define TOUCH_INT 36
    #define TOUCH_IRQ 36

    Reply
  4. Has anyone done anything with going into sleep on this board, what sort of mA do you down to for light sleep, or deep sleep?

    And how do you turn off display eyc, just with CS?

    Reply
  5. As usual, very good article.
    Meanwhile, GPIO 16 is used both for SPI (TFT_MISO) and the green led ?

    I tested to switch on/off the leds and the green one is mapped to GPIO 16.
    I tried to set TFT_MISO to GPIO 16 and the TFT works !

    Meanwhile, if you want to use the green LED and both the TFT, you will have to define TFT_MISO to something else (I tried 12, 16, 19 and either 21 !). Of course, if you use pin 12, you won’t be able to use TFT_RST.

    Starting from the default example: https://randomnerdtutorials.com/cheap-yellow-display-esp32-2432s028r/

    I added these definitions:
    #define PIN_LED_R 4
    #define PIN_LED_G 16
    #define PIN_LED_B 17

    And then this method :
    void animateLed(int pinNumber) {
    digitalWrite(pinNumber, LOW);
    delay(500);
    digitalWrite(pinNumber, HIGH);
    delay(500);
    }

    In the setup method, before initializing, set the leds pin mode:
    pinMode(PIN_LED_R, OUTPUT);
    pinMode(PIN_LED_G, OUTPUT);
    pinMode(PIN_LED_B, OUTPUT);

    and finally, in the loop method, animate the leds:

    animateLed(PIN_LED_R);
    animateLed(PIN_LED_G);
    animateLed(PIN_LED_B);

    Finally, in the printTouchToSerial method, add the TFT pins definition to make sure what is User_Setup.h file is used:
    Serial.println(“————————————————-“);
    Serial.print(“TFT_MISO: “);
    Serial.println(TFT_MISO);
    Serial.print(“TFT_MOSI: “);
    Serial.println(TFT_MOSI);
    Serial.print(“TFT_SCLK: “);
    Serial.println(TFT_SCLK);
    Serial.print(“TFT_CS: “);
    Serial.println(TFT_CS);
    Serial.print(“TFT_DC: “);
    Serial.println(TFT_DC);
    Serial.print(“TFT_RST: “);
    Serial.println(TFT_RST);
    Serial.println(“————————————————-“);

    If TFT_MISO is set to 16 (same as green led), the TFT will work but the led not.
    If TFT_MISO is set to something else, both will work, and displaying the TFT_MISO pin like it is defined in the User_Setup.h file :

    X = 262 | Y = 193 | Pressure = 2675

    TFT_MISO: 12
    TFT_MOSI: 13
    TFT_SCLK: 14
    TFT_CS: 15
    TFT_DC: 2

    TFT_RST: -1

    How is it possible that the TFT_MISO can change to other pin ?
    I do not understand.

    Reply
    • MISO = “Master In Slave Out” (which means the board talking to the MCU).
      but the board never talks to the MCU (only the MCU sends data to the display, it never reads anything back from it).

      Reply
  6. CYD I/O Pinouts Pin Identification:
    First it should be noted that the purchase of a CYD does not automatically guarantee the receipt of the short, four wire cable which connects to CN1 and P3 I/O connectors on the CYD PCB backside. I had to purchase two more CYD’s to receive two of the four wire I/O connector cables.

    Does anyone know who makes the cable assemblies if I wanted to buy some in the future?

    Second, identifying the CN1 ad P3 pin labels is difficult without a strong magnifying glass. White silkscreen on a yellow PCB has poor contrast and is hard to read.

    Third, the wire colors on the short cable assemblies are not identified. After sorting thru this set of problems, I offer my pin/wire identification:

    Connector CN1: Red – 3V3, Yellow – GPO27, Blue – GPO22, Black – Gnd
    Connector P3: Red – GPO21, Yellow – GPO22, Blue – GPO35, Black – Gnd

    Hope this information is useful for other CYD users

    Reply
    • Hey Mal,
      my board have the same pin 27 for the back-light, did you figure out what pin controls the touch screen? Looks like they are different from what is listed here,

      Cheers

      Serge

      Reply
  7. The ESP32-CYD has a GT36516, mounted near the Screen and Antenna, which is a Photoconductive Cell according to it’s datasheet. It has a resistance at 10 lux between 5K and 10K ohms. In the dark after 10 seconds it should be >0.3M ohms.

    With the Unit off and using a multimeter, I measured 4k ohms in a lit room and about 90K ohms with it covered whilst still having light to see the reading on the meter. So that proved that it is working

    Referring to the circuit diagram it connects between ground and GPIO34. It is paralleled with a 1M resistor R19 between Ground and GPIO34. GPIO34 is pulled up to the 3.3 Volt Supply by R15 also a 1M resistor. At 5K, the 1M will not affect the 5K reading. At 10K, the 1M will affect the reading to 9.9K and in Dark mode resistance of 0.3M (or 300K), the 1M resistor will affect the reading to 230K.

    Now using Light voltage divider of (5K * 3.3V /( 5K + 1M) we get 0.016417 Volts
    Using Dark voltage divider of (230K * 3.3V /( 230K + 1M) we get 0.617073 Volts

    So pretty useless! Suggestion would be remove R19 and then parallel what was R19 with R15 to make 500K. That would at least give 5K Light .032 Volts and 300K Dark 1.237V, a marked difference. If you have no R19 and replaced R15 with 1K, the range becomes light 2.75 V and dark 3.28 V and max current to the GPIO is 3.3 mA. R15 as a 5K, it is light 1.65 V and Dark 3.24 V and R15 as 10K, light is 1.1 V and dark is 3.19K and max GPIO current is 0.33mA. I am qualified at a sub-engineer level, now retired and that was easy to work out, so why did they choose 1 M ohm?

    I still enjoy electronics and doing the occasional project. I have modified code for a 60 LED Clock that can do either clockwise or anti-clockwise time and has a user programmable WiFi interface using ESP32. Currently using a ESP32-CYD as the basis for a battery management system. Also I enjoy designing and printing 3d models. My 60 LED clock uses my own designed housings.

    Your tutorials has helped me get started with the ESP32, so thank you.

    Reply
  8. Here is the working st7789 driver for the v3 boards now shipping:

    github.com/russhughes/st7789py_mpy/pull/15

    You need this tft_config.py file for it:
    github.com/gitcnd/st7789py_mpy/tree/master/tft_configs/esp32-2432S028r_st7789

    """ ESP32-2432S028R 320x240 st7789 display sometimes known as "Cheap Yellow Board" (CYD) - this is the v3 board

    """

    from machine import Pin, SPI
    import st7789py as st7789

    TFA = 40
    BFA = 40
    WIDE = 1
    TALL = 0
    SCROLL = 0 # orientation for scroll.py
    FEATHERS = 1 # orientation for feathers.py

    def config(rotation=0):
    """
    Configures and returns an instance of the ST7789 display driver.

    Args:
    rotation (int): The rotation of the display (default: 0).

    Returns:
    ST7789: An instance of the ST7789 display driver.
    """

    return st7789.ST7789(
    SPI(1, baudrate=40000000, sck=Pin(14), mosi=Pin(13), miso=None),
    240,
    320,
    reset=Pin(0, Pin.OUT),
    cs=Pin(15, Pin.OUT),
    dc=Pin(2, Pin.OUT),
    backlight=Pin(21, Pin.OUT),
    rotation=rotation)

    Reply
  9. Hi there,
    I’d like to use CYD to control two relays based on readings from four DS18B20 sensors.
    If read the post correctly I have 3 pins I can use – one for sensors and two for the relays. I’ve already ordered two 3.3V relays, but as I’m not an electronic I’d like to know if the 3.3V output on CN1 can be used to power the relays.

    Reply
      • There is no way a 3.3V logic output can drive a relay directly.

        So you need to find out if @Misiu has ordered bare relays or module(s) that have relay drivers before you can answer their question. And even if they have bought a module like this aliexpress.com/item/1005003750654499.html there’s still the question of how much power is available at 3.3V.

        Reply
        • I have almost exact same relay modules – aliexpress.com/item/32881636778.html.

          My CYD has two USB ports, so I was thinking to use USB-C to power the board and Micro USB to power the relay module (I have ordered additional 5V module).

          How can I check if the board (the display) can power and control the relay module without destoying the board. I’ve tried to seach for any spec, but wasn’t able to find anything.

          Reply
          • You should be able to drive one of those relay modules directly from your CYD. The load that the CYD is driving is an LED inside the optocoupler. On the isolated side of the optocoupler, output side is a transistor that drives the relay. On that module there are two separate isolated circuits, which is why you need a separate power source for the relay board. You have not mentioned what kind of a load you are controlling with the relay. If it is something large, you will be using the small relay on the board to control a larger relay. Good luck on your project

      • Hi Sara, thank you for the reply.
        The question is – if the 3.3V output on the CYD can power the relay module and four DS18B20 sensors. Any ideas how can I check this?

        Reply
  10. I think it should be mentioned in the description that the GPIO35 is INPUT ONLY pin and it can’t be used, for example with DS18B20 sensors or to control relays.
    I wish I had known that before I bought the display.
    Can I repurpose SD Card Pins? According to the info I found (https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/PINS.md#sd-card)
    I should be able to use GPIO5, GPIO18, GPIO19 and GPIO23.
    The pins near the card are very tiny, but I think that I’ll be able to solder some wires to the IC.
    Has anyone tried that before?

    Reply
  11. TTL RX is routed incorrectlly and as it is now, one will never be able to use it.

    Its a great device. However, Theres a mistake on the Board. The RXD pin is tied to the CH340 chip TX pin. The result is that the external TTL serial port cannot receive. (without modifying it) This is a problem. There is a resistor in the line but the line that goes to the CPU RX pin should be tied to the other side of the resistor. Do this change in otder for the TTL serial to work.

    Reply
  12. I’ve bought a bunch of these – some old versions, some new ones, and a few different-sized capacitive touch ones: all of them suffer spurious touch-events when left powered-on for a while (e.g. overnight)… am I the only one?
    Any idea what I might be doing wrong?
    different boards suffer those ghost-touches in different places on their screens, so I don’t think it’s my code?

    Reply
  13. Hello Rui, I have a question. I have a project that needs to connect several peripherals to the CYD. Could I define another pin to handle the backlight (for example, GPIO 23, since I won’t be using the SD card) in order to keep pin 21 free for connecting peripherals? Thank you and best regards.

    Reply
    • Hi.
      I’m not sure. I haven’t tried it.
      But, you can try and see if it works.
      Then, you can share your feedback.
      Regards,
      Sara

      Reply
  14. Silly question: I understand that I need the USB cable to program the board, but once the code is uploaded is the USB cable still the only way to power the board? I don’t see any pads to connect 5V and GND to.

    Reply
  15. For those interested in using the P1 port on this device as a serial port (i.e. Serial), this is entriely possible. You should supply +5V to Vin. For this test I used a UART to usb converter board that supplied 5V to Vin and 3.3V for the TX and RX connections. I immediately saw data streaming from the CYD P1 port and no magic smoke. I do hope this helps someone.

    Reply
  16. TX/RX connector:
    fyi it worked for me with:(straight from the RNT tutorials!)

    #include <lvgl.h>
    #include <TFT_eSPI.h>
    #include <TinyGPS++.h>
    #include “gps_image.h”
    // Define the RX and TX pins for Serial 2
    #define RXD2 1
    #define TXD2 3
    #define GPS_BAUD 9600
    TinyGPSPlus gps;
    HardwareSerial gpsSerial(2);
    #define SCREEN_WIDTH 240
    #define SCREEN_HEIGHT 320

    Reply
  17. I want to use a MPU6050 accelerometer with my CYD. Can I use GPIO 22 and 35? Or do I need to do the backlight mod to free GPIO 21? Thanks

    Reply
  18. For anyone wanting to use serial/UART comms via P5. The only way I’ve found to get this working is to remove the CH340 and swap the two series resistors, R5 & R6 out for 0R. You may get away with 20R or something for those but 100R is too high.

    This means you must program it via P5 using an external USB to serial. You could also use the pads of the CH340 to connect RTS/DTS for reset but I just hold RST and BOOT, release RST and program.

    Reply

Leave a Comment

Download Our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.