Tengo un problema con un display genérico ST7789 de 2.8", resolución 240x320, cuando trato de importarle cualquier código de prueba mientras se sube a mi arduino UNO aparece brevemente en el display, parpadea, y después que se subió por completo aparece en blanco. Ya que no encontré mucha información sobre cómo conectarlo, traté de guiarme con displays más pequeños
Y este es mi código de prueba
#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>
// Define pins
#define TFT_CS 10
#define TFT_RST 8
#define TFT_DC 9
// Create ST7789 object
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
void setup() {
// Initialize SPI communication
SPI.begin();
SPI.setClockDivider(SPI_CLOCK_DIV2);
// Initialize the display with a resolution of 240x320
tft.init(240, 320);
// Set rotation if needed
tft.setRotation(1); // Adjust this value (0-3) as needed for your setup
// Fill screen with a color
tft.fillScreen(ST77XX_BLACK);
// Display a message
tft.setTextColor(ST77XX_WHITE);
tft.setTextSize(2);
tft.setCursor(10, 10);
tft.print("Hello, World!");
delay(6000);
tft.print("Prueba");
// Add a for loop to keep the message displayed
}
void loop() {
// Leave this empty
}
