Closed PlastiBots closed 2 years ago
That is a new display variant that does not invoke the correct offsets. I expect the offset is 35 i.e. (240 - 170)/2
Run this sketch and tell me if you see a complete green rectangle outline (all 4 sides).
#include <SPI.h>
#include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI();
void setup() {
tft.init();
tft.setRotation(1);
tft.fillScreen(TFT_BLACK);
tft.setViewport(0, 35, 320, 170);
tft.frameViewport(TFT_GREEN, 1);
}
void loop()
{
}
Thanks. This is what I get:
OK, that makes sense as the library is limiting the y coord to 170. It tells me the offset is correct.
I will update the library within the next 24 hours.
If you set the screen width to 240 instead of 170 then the above sketch will work and you can draw graphics providing you include the tft.setViewport(0, 35, 320, 170); in you sketch.
I will update the library but I have another task that is urgent.
That did the trick! Thanks so much for the quick attention to this!
Hi. First, thanks for this great library! I'm having an issue where it seems only part of the screen is being used. It's as if it's rendering content but shifted up by about 30px. This is demonstrated by the attached images. I've got the correct image WxH set per BuyDisplay. The first shows the fillscreen function with yellow only filling the top area with missing fill to the right and bottom. The second shows images rendering correctly, but about 30px higher than normal. There are graphics at the top that are not showing (pushed off the top).
My setup: ESP32 DEVKIT V1. TFT_eSPI v2.4.50, Arduino IDE 1.8.13. ESP32 Boards 2.0.2 TFT driver is ST7789V2. The display is this one but note the page says ST7789 but the print on the board says ST7789V2. Interface is SPI
The TFT_eSPI Setup file I am using is a clone of 25: