Closed modi12jin closed 2 years ago
Yes, it is similar to RPi Pico. I just not yet have time connect test it. Can you help this?
I have just added a new Arduino_ESP32S2PAR8 data bus, would you please help to check is it work for you?
@moononournation success
#include <Arduino_GFX_Library.h>
#define TFT_CS -1
#define TFT_DC 41
#define TFT_RST -1
#define TFT_RD -1
#define TFT_WR 40
#define TFT_BL -1
// ESP32S2 parallel 8-bit
// Display D0-D7 connect to GPIO 0-7
Arduino_DataBus *bus = new Arduino_ESP32S2PAR8(TFT_DC, TFT_CS, TFT_WR /* WR */, TFT_RD /* RD */);
Arduino_GFX *gfx = new Arduino_ST7789(bus, TFT_RST, 0 /* rotation */, true /* IPS */);
/*******************************************************************************
* End of Arduino_GFX setting
******************************************************************************/
void setup(void)
{
gfx->begin();
gfx->fillScreen(BLACK);
#ifdef TFT_BL
pinMode(TFT_BL, OUTPUT);
digitalWrite(TFT_BL, HIGH);
#endif
gfx->setCursor(10, 10);
gfx->setTextColor(RED);
gfx->println("Hello World!");
delay(5000); // 5 seconds
}
void loop()
{
gfx->setCursor(random(gfx->width()), random(gfx->height()));
gfx->setTextColor(random(0xffff), random(0xffff));
gfx->setTextSize(random(6) /* x scale */, random(6) /* y scale */, random(2) /* pixel_margin */);
gfx->println("Hello World!");
delay(1000); // 1 second
}
ESP32-S2 can be added to support 8-bit parallel port