Hello, I have been trying to display plain text on my screen for a long time, but I have encountered several problems.
My display: https://a.aliexpress.com/_Eyq6ZJb st7789 with touch
my arduino: uno r3 dip atmega328p u
pins: VCC-5v, GND-GND, CS-10, RESET-9, DC-8, SDI(MOSI)-11, SCK-13, LED-3.3v, SDO(MISO)-12
my code:
#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>
#define TFT_CS 10
#define TFT_RST 9
#define TFT_DC 8
#define TFT_SDI 11
#define TFT_SCK 13
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
void setup(void) {
tft.init(240, 320);
tft.setRotation(1);
tft.fillScreen(ST77XX_BLACK);
tft.setCursor(10, 50);
tft.setTextSize(2);
tft.setTextColor(ST77XX_WHITE);
tft.println("Hello, World!");
}
void loop() {
}
after clicking the reset button on the Araduino, nothing happens, only when I touch the Arduino with my fingers and "ground" it, after clicking the reset, the "hello world" inscription appears for the duration of the LED flashing and after a while it goes out. the background in the program is set to black and the screen is white (the text is also black instead of white).
I will be very glad for help, thanks ![]()