Thanks @david_prentice
Sorry for the late reply, I was on holiday.
I tried your suggestion, but I still cannot see anything on the screen.
My code seems to do something, but the screen is black.
#include <SPI.h>
#include <stdio.h>
#include <TFT_eSPI.h> // Invoke hardware library
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
delay(3000);
Serial.println("Hello");
//initialise TFT_eSPI library
tft.init();
tft.begin();
delay(1000);
}
void loop() {
// put your main code here, to run repeatedly:
tft.fillScreen(TFT_WHITE); //if this line is commented out, the next serial output is much faster --> something seems to happen.
Serial.println("White?");
delay(200);
}
I have the feeling, that the backlight might be switched off. However, I cannot figure how to switch it on. I tried changing #define TFT_BACKLIGHT_ON HIGH to #define TFT_BACKLIGHT_ON LOW in the user setup, but without any obvious effect.
Do you have any suggestion on how to turn on the backlight?
EDIT:
The backlight works properly (I found a position on the device, where I can see it). I can switch it on/off and even dim it via digitalwrite or analogwrite commands.
Accordingly, the LCD screen seems to be "off".
If I run the TFT_ReadWrite_Test.ino, I only get errors like this
Pixel value written = 2
Pixel value read = 0
ERROR ^^^^
Pixel value written = 4
Pixel value read = 0
ERROR ^^^^
Pixel value written = 8
Pixel value read = 0
ERROR ^^^^
Pixel value written = 10
Pixel value read = 0
ERROR ^^^^
(and so on)
EDIT2:
I ran the ReadUserSetup tool. The result looks wrong to me. Shouldn't there be positive PIN-numbers?
TFT_eSPI ver = 2.3.70
Processor = Transactions = Yes
Interface = SPI
Display driver = 9486
Display width = 320
Display height = 480
MOSI = GPIO -111
MISO = GPIO -112
SCK = GPIO -110
TFT_CS = GPIO -1
TFT_DC = GPIO -1
TFT_RST = GPIO -1
TOUCH_CS = GPIO -1
TFT_BL = GPIO -1
TFT_BACKLIGHT_ON = HIGH
Font GLCD loaded
Font 2 loaded
Font 4 loaded
Font 6 loaded
Font 7 loaded
Font 8 loaded
Smooth font enabled
Display SPI frequency = 2.00
Touch SPI frequency = 2.50