ESP32-S3 7-inch Display: How to Rotate Text from Horizontal to Vertical?

Hello everyone, I'm new here :slight_smile:

I recently purchased a 7-inch display with an ESP32-8048S070 chip.

Link: https://aliexpress.com/item/1005004952726089.html?spm=a2g0o.order_list.order_list_main.23.2c585c5fCZLXQj&gatewayAdapt=glo2deu

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

this is what the display looks like.

I would like to have the text on the top left.

did you try other values..
try 0, think that's the one you need..
do in setup, just below screen begin..

good luck.. ~q

with:

  gfx->begin();
  gfx->setRotation(0);

the output looks the same.

with:

  gfx->begin();
  gfx->setRotation(1);

does it look like it?

looks like the rgb channels does not support the function? :frowning:

Hi, I have the same problem, did you find a solution? Thanks.

No, it was a limitation of the hardware i believe..
sorry.. ~q

did you manage to rotate the screen? If yes, what was the procedure? Thanks.

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