Hi,
I like to use a NHD-2.4-240320CF-CSXN#-F from Newhaven Display (Product Specification) with a ESP32 Devkit V1 (Product Specifications).
Here is video where this display is used with an ESP32 Devkit V1.
My Sketch to test is:
//**** Screen and SPIFFS Headers and Defines ****
//************************************************
//#include<HardwareSerial.h>
#include<TFT_eSPI.h>
#include<SPI.h>
#include "LogoJR.h"
#include "LogoOV.h"
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
#define GREY 0x18E3
//HardwareSerial Serial1(1);
TFT_eSPI tft = TFT_eSPI();
TFT_eSprite needle = TFT_eSprite(&tft);
TFT_eSprite Nav1 = TFT_eSprite(&tft);
TFT_eSprite Nav2 = TFT_eSprite(&tft);
//******************************************
//**** FreeRTOS Headers and Variables ****
//******************************************
#include"freertos/FreeRTOS.h"
#include"freertos/Task.h"
//#include"freertos/semphr.h"
#include"esp_system.h"
#include<stdio.h>
#define OuterRadius 160
#define InnerRadius 130
#define xCenter 160
#define yCenter 160
void setup() {
tft.init();
tft.setRotation(0);
Serial.begin(115200,SERIAL_8N1);
}
void loop() {
delay(20);
}
//*************************
//**** Splash Screen ****
//*************************
void splash(){
Serial.print("Splash Screen");
tft.fillScreen(BLACK);
tft.drawBitmap(45,85,logobunny,150,149,WHITE);
delay(3000);
tft.fillScreen(WHITE);
tft.setWindow(20,91,20+199,91+136);
tft.pushColors(logoOV,200*137);
delay(3000);
tft.fillScreen(GREY);
tft.fillCircle(xCenter,yCenter,InnerRadius,BLACK);
}
Configuration at User_Setup.h from the TFT_eSPI library is:
#define ST7789_DRIVER
#define TFT_WIDTH 240
#define TFT_HEIGHT 320
#define ESP32_PARALLEL
#define TFT_CS -1
#define TFT_DC 15
#define TFT_RST 22
#define TFT_WR 2
#define TFT_RD 4
#define TFT_D0 16
#define TFT_D1 17
#define TFT_D2 5
#define TFT_D3 18
#define TFT_D4 19
#define TFT_D5 21
#define TFT_D6 26
#define TFT_D7 25
#define SMOOTH_FONT
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 20000000
#define SPI_TOUCH_FREQUENCY 2500000
I'm not able to get a picture. I have no idea what I've made wrong. Hope someone could help me.