Arduino + TFT_eSPI + LCD 3.5 RP2040 User_Setup.h error

For those interested in trying TFT_eSPI with the LCD 3.5 RP2040 device, the Arduino Examples for TFT_eSPI do work, however the User_Setup.h supplied by Elecrow is not entirely correct.

The definition for TFT_BL needs to be updated in section 2, where a stub definition already exists, but is commented out. In addition, the line that actually enables the LCD backlight needs to be uncommented. With User_Setup.h the way it is, the sketch runs, but nothing is visible - the screen is black. TFT_eSPI.cpp never sees the definition of TFT_BACKLIGHT_ON, so the LCD backlight never gets switched on.

To remedy the situation, Section 2 should start with this:
#define TFT_BL 18 // LED back-light control pin
#define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)

The definition for TFT_BL, further down in Section 2 (where TOUCH_CS is defined) should be removed.

Comments

  • Thank you for your feedback. Because we set the backlight in the main program, we comment out the backlight definition in the library.

Sign In or Register to comment.