adafruit / Adafruit-SSD1351-library

Adafruit library for the 1.27" and 1.5" color OLEDs in the shop
http://www.adafruit.com/products/1431
Other
107 stars 49 forks source link

setRotation() not working right #31

Open GabeHC opened 4 years ago

GabeHC commented 4 years ago

setRotation not working correctly, I have to disable it.

ladyada commented 4 years ago

hi please provide more specific information

GabeHC commented 4 years ago

Platform : ESP32 Board : Wemos D1 R32 Project : Adafruit SSD1351 library test example. uncomment // tft.setRotation(1); will screwup screen line and text, none of any screen rotation angle will work!

void oled_demo(void) {
  Serial.print("hello!");
  tft.begin();

  Serial.println("init");

  // You can optionally rotate the display by running the line below.
  // Note that a value of 0 means no rotation, 1 means 90 clockwise,
  // 2 means 180 degrees clockwise, and 3 means 270 degrees clockwise.
  tft.setRotation(1);
  // NOTE: The test pattern at the start will NOT be rotated!  The code
  // for rendering the test pattern talks directly to the display and
  // ignores any rotation.

  uint16_t time = millis();
  tft.fillRect(0, 0, 128, 128, BLACK);
  time = millis() - time;

  Serial.println(time, DEC);
  delay(500);

17973

Normal screen

17974

Mael19 commented 3 years ago

Hello, did you manage to fix your issue ? Because I'm expecting the same with my SSD1351 screen and LOLIN D32 board. When no rotation is specified everything works fine but the I set a specific rotation all the coordinates seem to be stretched/glitched.

Mael19 commented 3 years ago

Hello, does anyone have a solution for the rotation issue ? I tried to understand, and it seems that it has something to do with the MADCTL byte, but it's too low level for me to understand right. Help would be much appreciated!