I have been trying to get a display from waveshare working with NodeMCU ESP32S. The display says 1.69inch LCD, 240 x 280 pixels, ST778V2. Searching on the internet results with article leading to ST7789 only. This display has a weird pinout as well which is similar to ST7735. Below are the pins that I have.
VCC, GND, DIN, CLK,CS,DC,RST and BLK. I have tried Adafruit_ST7789 and TFT_ESPI library with different variations of code and connections but none seems to work. Below is one of the code.
#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>
// Define pins for ESP32
#define TFT_CS 15
#define TFT_RST 2
#define TFT_DC 17
// Create an instance of Adafruit_ST7789
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
void setup() {
Serial.begin(115200);
// Initialize display
tft.init(240, 280); // Initialize ST7789 with a pixel width of 240 and height of 240
// Fill the screen with black color
tft.fillScreen(ST77XX_BLACK);
// Set text color to white
tft.setTextColor(ST77XX_WHITE);
// Set text size
tft.setTextSize(2);
// Set cursor position
tft.setCursor(0, 0);
// Display "Hello, World!"
tft.println("Hello, World!");
}
void loop() {
// Nothing here for a static display
}
I am in dire need to help on this one. It has been 2days I am trying this but the information about this V2 display is limited. Please be nice, I am just a beginner in all this.
Below are the pin connections and diagram.
| ESP32 Pin | ST7789V2 pin |
|---|---|
| GPIO13 | DIN |
| GPIO14 | CLK |
| GPIO15 | CS |
| GPIO17 | DC |
| GPIO2 | RST |
| 3V3 | BL |
| 5V | VCC |
| GND | GND |
