MartyMacGyver / ESP32_Adafruit_ILI9341

Driver and sample code for ILI9341-based TFT displays designed for the ESP32 / ESP32-WROVER-KIT
47 stars 11 forks source link

Bottom quarter/fifth of LCD not updating/displaying #3

Closed JosephRedfern closed 5 years ago

JosephRedfern commented 7 years ago

Hi,

When deploying this code to the ESP-WROVER-KIT (v3), the bottom quarter (ish) of the LCD doesn't update/display anything. I've tried this on two kits, so I don't think it's a hardware fault -- and the NES emulator demo works OK on both boards.

I've uploaded a video of the problem here: https://www.youtube.com/watch?v=1wIHl3J1imI.

I've tried changing rotation, to no avail. This is occurring on both master and exp1 branches.

Any ideas/pointers?

JosephRedfern commented 7 years ago

DOH. As is often the case, immediately after submitting this issue, I managed to fix the problem.

Swapping the values for ILI9341_TFTWIDTH and IL9341_TFTHEIGHT in https://github.com/MartyMacGyver/ESP32_Adafruit_ILI9341/blob/master/demos/esp-idf/hvac-demo/components/ili9341/include/Adafruit_ILI9341_fast_as.h#L13 fixes this problem entirely.

Not sure is this is a change which came with v3 of the board?

MartyMacGyver commented 7 years ago

I'm glad to head you found a workaround!

The ESP-WROVER-BOARD keep changing: unlike the v1/v2 boards with LCDs using the ILI9341 chipset, the v3 uses the ST7789V chipset for the LCD.

There is more discussion here, but as I don't have an ST7789V-based board to test against my demos are a bit dated currently.

JosephRedfern commented 7 years ago

Thanks for the link, I'd missed that. It's pretty confusing for them to make that change -- it doesn't seem very well documented by Espressif.

I'd gladly test any demos against one of my v3 boards if it's ever any use to you.

I guess this issue can be closed, unless you thought porting version checks (like https://github.com/espressif/WROVER_KIT_LCD/blob/master/src/WROVER_KIT_LCD.cpp#L208) would be a good idea? To be honest, I'm not sure how much code is/can be shared between the esp-idf and arduino-esp32 LCD libraries... if it's possible to use Espressif's fork of Adafruit's library in esp-idf projects then I guess adding version checks to your modified library probably isn't worth it. If however it's not compatible, then I'd gladly submit a patch to this repo adding support for ST7789V-based boards.

Cheers, Joe

G6EJD commented 7 years ago

I found the same problem, but when I sue the Espressif 9341 driver for WRover the problems are resolved. When the screen is rotated the width and height are not being rotated too. I'm using the Arduino IDE and this driver https://github.com/espressif/WROVER_KIT_LCD / library. The Adafruit library is ESP32 aware, but is not working (cropping) when rotated.

MartyMacGyver commented 7 years ago

Well, technically I'd need to do two things here: convert the examples to the new library (which wasn't really around back when I did this originally) and rename this repo (since it's not really ILI9341-specific at that point). I'll look into it.

tobozo commented 7 years ago

@JosephRedfern swapping values wasn't enough for me with the v3 I had to edit the value of setRotation() to get it working https://github.com/MartyMacGyver/ESP32_Adafruit_ILI9341/blob/master/demos/esp-idf/hvac-demo/main/ui.cpp#L247

JosephRedfern commented 7 years ago

@tobozo ah yes -- I think swapping alone may work for specific rotation settings, but I encountered the same problem when subsequently changing rotation.