ESP32 and GC9A01 on Arduino Sketch

Hi everyone, I want to connect and ESP32 WROOM 32 with a GC9A01. I am currently testing the HelloWorld example using the Arduino GFX library. The code does not give any errors, however once uploaded, nothing happens. I would really appreciate any help! Thanks in advance.

Blok-alıntı
' <


  • Start of Arduino_GFX setting
  • Arduino_GFX try to find the settings depends on selected board in Arduino IDE
  • Or you can define the display dev kit not in the board list
  • Defalult pin list for non display dev kit:
  • Arduino Nano, Micro and more: CS: 9, DC: 8, RST: 7, BL: 6
  • ESP32 various dev board : CS: 5, DC: 27, RST: 33, BL: 22
  • ESP32-C3 various dev board : CS: 7, DC: 2, RST: 1, BL: 3
  • ESP32-S2 various dev board : CS: 34, DC: 35, RST: 33, BL: 21
  • ESP32-S3 various dev board : CS: 40, DC: 41, RST: 42, BL: 48
  • ESP8266 various dev board : CS: 15, DC: 4, RST: 2, BL: 5
  • Raspberry Pi Pico dev board : CS: 17, DC: 27, RST: 26, BL: 28
  • RTL8720 BW16 old patch core : CS: 18, DC: 17, RST: 2, BL: 23
  • RTL8720_BW16 Official core : CS: 9, DC: 8, RST: 6, BL: 3
  • RTL8722 dev board : CS: 18, DC: 17, RST: 22, BL: 23
  • RTL8722_mini dev board : CS: 12, DC: 14, RST: 15, BL: 13
  • Seeeduino XIAO dev board : CS: 3, DC: 2, RST: 1, BL: 0
  • Teensy 4.1 dev board : CS: 39, DC: 41, RST: 40, BL: 22
    ******************************************************************************/
    #include <Arduino_GFX_Library.h>

#if defined(DISPLAY_DEV_KIT)
Arduino_GFX gfx = create_default_Arduino_GFX();
#else /
!defined(DISPLAY_DEV_KIT) */

#if defined(ESP32)
#define CS 5
#define DC 27
#define RST 33
#define BL 22
#endif
/* More data bus class: Data Bus Class · moononournation/Arduino_GFX Wiki · GitHub */
//Arduino_DataBus *bus = create_default_Arduino_DataBus();
//Arduino_DataBus bus = new Arduino_ESP32SPI(12 / DC /, 15 / CS /, 14 / SCK /, 13 / MOSI /, -1 / MISO /, HSPI / spi_num */);
Arduino_DataBus bus = new Arduino_ESP32SPI(27 / DC /, 5 / CS /, 18 / SCK /, 23 / MOSI /, -1 / MISO /, VSPI / spi_num */);

/* More display class: Display Class · moononournation/Arduino_GFX Wiki · GitHub */
//Arduino_GFX gfx = new Arduino_ILI9341(bus, DF_GFX_RST, 0 / rotation /, false / IPS */);
//Arduino_GFX gfx = new Arduino_GC9A01(bus, 2 / RST /, 0 / rotation /, true / IPS */);
Arduino_GFX gfx = new Arduino_GC9A01(bus, 7 / RST /, 0 / rotation /, true / IPS */);

#endif /* !defined(DISPLAY_DEV_KIT) /
/
******************************************************************************

  • End of Arduino_GFX setting
    ******************************************************************************/

/*******************************************************************************

  • End of Arduino_GFX setting
    ******************************************************************************/

void setup(void)
{
gfx->begin();
gfx->fillScreen(BLACK);

#ifdef GFX_BL
pinMode(GFX_BL, OUTPUT);
digitalWrite(GFX_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

}>'

Please use code tags around your posted code.

Hi - Did you ever find a solution ?...I have the same problem
Thank you

Thank you for sharing this over here ~ Jozef Behr

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.