PaulStoffregen / ILI9341_t3

Optimized ILI9341 TFT Library
http://pjrc.com/store/display_ili9341.html
241 stars 93 forks source link

Library does not work with ILI9341 modules that are natively Landscape, or RGB (vs BGR). #68

Open SmittyHalibut opened 2 years ago

SmittyHalibut commented 2 years ago

Description

  1. Library does not support ILI9341 modules that are natively landscape (320x240, instead of 240x320).
  2. Library does not support ILI9341 modules that are natively RGB (instead of BGR).

I've submitted a Pull Request to add support for both these: https://github.com/PaulStoffregen/ILI9341_t3/pull/67

Steps To Reproduce Problem

  1. Buy a cheap knock-off ILI9341 module, such as https://www.ebay.com/itm/324442623660
  2. Use this ILI9341_t3 library to write to it. (Note: Adafruit_ILI9341 has the same problem.)
  3. Run the graphicstest sketch.
  4. Note that in "unrotated" mode, it's printing in Landscape mode. Since the library assumes the display is Portrait, it only uses the left most 240 columns, and the bottom most 80 rows wrap around to the top 80 rows.
  5. Note further that the loop() code, which runs the display through different setRotation() values, has the same problem. That is, calling setRotation() does not fix this problem.

Hardware & Software

Board: Teensy 3.5 Shields / modules used: cheap ILI9341 off eBay: https://www.ebay.com/itm/324442623660 Arduino IDE version: 1.8.16 Teensyduino version: 1.55 Operating system & version: Ubuntu 20.04 LTS, up to date. Any other software or hardware?

Arduino Sketch

// Change the code below by your sketch (please try to give the smallest code which demonstrates the problem)

/*
 * Use the `graphicstest` sketch that comes with the ILI9341_t3 library.
 */

Errors or Incorrect Output

If you see any errors or incorrect output, please show it here. Please use copy & paste to give an exact copy of the message. Details matter, so please show (not merely describe) the actual message or error exactly as it appears.

None.

Provided solution

https://github.com/PaulStoffregen/ILI9341_t3/pull/67