Thanks for the information. I found this on GitHub:
https://github.com/wegi1/ESP32-8048S070-7INCH-LCD
Keeping things simple, Im using the TFT_Helloworld/Hello/HelloWorld.ino with the configuration you gave me. Code to follow:
/*******************************************************************************
******************************************************************************/
#include <Arduino_GFX_Library.h>
#define GFX_BL DF_GFX_BL // default backlight pin, you may replace DF_GFX_BL to actual backlight pin
#define TFT_BL 2
/* More dev device declaration: https://github.com/moononournation/Arduino_GFX/wiki/Dev-Device-Declaration */
#if defined(DISPLAY_DEV_KIT)
Arduino_GFX *gfx = create_default_Arduino_GFX();
#else /* !defined(DISPLAY_DEV_KIT) */
/* More data bus class: https://github.com/moononournation/Arduino_GFX/wiki/Data-Bus-Class */
//Arduino_DataBus *bus = create_default_Arduino_DataBus();
/* More display class: https://github.com/moononournation/Arduino_GFX/wiki/Display-Class */
//Arduino_GFX *gfx = new Arduino_ILI9341(bus, DF_GFX_RST, 0 /* rotation */, false /* IPS */);
Arduino_ESP32RGBPanel *bus = new Arduino_ESP32RGBPanel(
GFX_NOT_DEFINED /* CS */, GFX_NOT_DEFINED /* SCK */, GFX_NOT_DEFINED /* SDA */,
40 /* DE */, 41 /* VSYNC */, 39 /* HSYNC */, 42 /* PCLK */,
45 /* R0 */, 48 /* R1 */, 47 /* R2 */, 21 /* R3 */, 14 /* R4 */,
5 /* G0 */, 6 /* G1 */, 7 /* G2 */, 15 /* G3 */, 16 /* G4 */, 4 /* G5 */,
8 /* B0 */, 3 /* B1 */, 46 /* B2 */, 9 /* B3 */, 1 /* B4 */
);
// option 1:
// 7寸 50PIN 800*480
Arduino_RPi_DPI_RGBPanel *gfx = new Arduino_RPi_DPI_RGBPanel(
bus,
// 800 /* width */, 0 /* hsync_polarity */, 8/* hsync_front_porch */, 2 /* hsync_pulse_width */, 43/* hsync_back_porch */,
// 480 /* height */, 0 /* vsync_polarity */, 8 /* vsync_front_porch */, 2/* vsync_pulse_width */, 12 /* vsync_back_porch */,
// 1 /* pclk_active_neg */, 16000000 /* prefer_speed */, true /* auto_flush */);
800 /* width */, 0 /* hsync_polarity */, 8 /* hsync_front_porch */, 4 /* hsync_pulse_width */, 8 /* hsync_back_porch */,
480 /* height */, 0 /* vsync_polarity */, 8 /* vsync_front_porch */, 4 /* vsync_pulse_width */, 8 /* vsync_back_porch */,
1 /* pclk_active_neg */, 16000000 /* prefer_speed */, true /* auto_flush */);
#endif /* !defined(DISPLAY_DEV_KIT) */
/*******************************************************************************
* 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(2000); // 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
}
Its throwing an error as follows:
C:\Users\Datahead\AppData\Local\Temp\.arduinoIDE-unsaved202392-18344-ajtkxz.cxju4\sketch_oct2a\sketch_oct2a.ino:24:1: error: no matching function for call to 'Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int)'
);
^
In file included from c:\Users\Datahead\OneDrive\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/Arduino_GFX_Library.h:17,
from C:\Users\Datahead\AppData\Local\Temp\.arduinoIDE-unsaved202392-18344-ajtkxz.cxju4\sketch_oct2a\sketch_oct2a.ino:3:
c:\Users\Datahead\OneDrive\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:59:3: note: candidate: 'Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, int32_t, bool, uint16_t, uint16_t)'
Arduino_ESP32RGBPanel(
^~~~~~~~~~~~~~~~~~~~~
c:\Users\Datahead\OneDrive\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:59:3: note: candidate expects 33 arguments, 23 provided
c:\Users\Datahead\OneDrive\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:56:7: note: candidate: 'constexpr Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(const Arduino_ESP32RGBPanel&)'
class Arduino_ESP32RGBPanel
^~~~~~~~~~~~~~~~~~~~~
c:\Users\Datahead\OneDrive\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:56:7: note: candidate expects 1 argument, 23 provided
c:\Users\Datahead\OneDrive\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:56:7: note: candidate: 'constexpr Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(Arduino_ESP32RGBPanel&&)'
c:\Users\Datahead\OneDrive\Documents\Arduino\libraries\GFX_Library_for_Arduino\src/databus/Arduino_ESP32RGBPanel.h:56:7: note: candidate expects 1 argument, 23 provided
C:\Users\Datahead\AppData\Local\Temp\.arduinoIDE-unsaved202392-18344-ajtkxz.cxju4\sketch_oct2a\sketch_oct2a.ino:27:1: error: 'Arduino_RPi_DPI_RGBPanel' does not name a type; did you mean 'Arduino_ESP32RGBPanel'?
Arduino_RPi_DPI_RGBPanel *gfx = new Arduino_RPi_DPI_RGBPanel(
^~~~~~~~~~~~~~~~~~~~~~~~
Arduino_ESP32RGBPanel
C:\Users\Datahead\AppData\Local\Temp\.arduinoIDE-unsaved202392-18344-ajtkxz.cxju4\sketch_oct2a\sketch_oct2a.ino: In function 'void setup()':
C:\Users\Datahead\AppData\Local\Temp\.arduinoIDE-unsaved202392-18344-ajtkxz.cxju4\sketch_oct2a\sketch_oct2a.ino:44:5: error: 'gfx' was not declared in this scope
gfx->begin();
^~~
C:\Users\Datahead\AppData\Local\Temp\.arduinoIDE-unsaved202392-18344-ajtkxz.cxju4\sketch_oct2a\sketch_oct2a.ino: In function 'void loop()':
C:\Users\Datahead\AppData\Local\Temp\.arduinoIDE-unsaved202392-18344-ajtkxz.cxju4\sketch_oct2a\sketch_oct2a.ino:61:5: error: 'gfx' was not declared in this scope
gfx->setCursor(random(gfx->width()), random(gfx->height()));
^~~
exit status 1
Compilation error: no matching function for call to 'Arduino_ESP32RGBPanel::Arduino_ESP32RGBPanel(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int)'
Any thoughts you may have would be greatly apreciated.
thanks,
Veronica
PS: Im about 20 years rusty on my coding skills, so I'm re-learning all the stuff I forgot.