Hello everyone, I'm new here
I recently purchased a 7-inch display with an ESP32-8048S070 chip.
With the example code, I can display text, but unfortunately, it's always displayed horizontally, and I'd like to have it displayed vertically.
Here's what I've tried so far:
gfx->setRotation(1);
However, this doesn't seem to work. I suspect it might be due to the RGB panel.
Here's the code I'm using:
#include <Arduino_GFX_Library.h>
#define GFX_BL DF_GFX_BL
#define TFT_BL 2
#if defined(DISPLAY_DEV_KIT)
Arduino_GFX *gfx = create_default_Arduino_GFX();
#else
Arduino_ESP32RGBPanel *bus = new Arduino_ESP32RGBPanel(
GFX_NOT_DEFINED, GFX_NOT_DEFINED, GFX_NOT_DEFINED,
41, 40, 39, 42,
14, 21, 47, 48, 45,
9, 46, 3, 8, 16, 1,
15, 7, 6, 5, 4);
Arduino_RPi_DPI_RGBPanel *gfx = new Arduino_RPi_DPI_RGBPanel(
bus,
800, 0, 210, 30, 16,
480, 0, 22, 13, 10,
1, 16000000, true);
#endif
#define BACKGROUND BLACK
#define TEXT_COLOR WHITE
void setup(void) {
Serial.begin(9600);
gfx->begin();
gfx->fillScreen(BACKGROUND);
#ifdef TFT_BL
pinMode(TFT_BL, OUTPUT);
digitalWrite(TFT_BL, HIGH);
#endif
}
void loop() {
gfx->setTextColor(TEXT_COLOR);
gfx->setTextSize(2);
gfx->setCursor(2, 2);
gfx->println("hello world");
delay(100);
gfx->fillScreen(BACKGROUND);
Serial.println("hello world");
}
Does anyone have any suggestions? Thanks in advance and have a great Sunday!
Best regards,
Raylan