ESP32+ILI9341 resets on tft.begin() #1571
Unanswered
HeikoH
asked this question in
Q&A - General
Replies: 2 comments 2 replies
-
With TFT_eSPI you CANNOT define the pins in the sketch, you must edit the library setup file when using the Arduino IDE. In PlatformIO you can use the platformio.ini file to define the pins. I expect that illegal pins are being declared in the setup file, this then casues the ESP32 to crash.. |
Beta Was this translation helpful? Give feedback.
1 reply
-
@Bodmer - defining stuff like in my snippet should be perfectly fine. But, I found the issue... I was missing #define USER_SETUP_LOADED
#define ILI9341_DRIVER
#define TFT_DC 16
#define TFT_RST 17
#define SMOOTH_FONT
#include <TFT_eSPI.h>
#define BACKLIGHT 4
TFT_eSPI tft = TFT_eSPI();
void setup() {
pinMode(BACKLIGHT, OUTPUT);
digitalWrite(BACKLIGHT, HIGH);
tft.init();
}
void loop() {
tft.fillScreen(ILI9341_RED);
delay(100);
tft.fillScreen(ILI9341_GREEN);
delay(100);
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The moment I call
tft.begin()
my ESP32 board (LOLIN32 Lite) with a ILI9341 display resets. Any idea what could be wrong?This results in a continues loop of resets:
note; a similar program using a different TFT library works fine, same device:
Beta Was this translation helpful? Give feedback.
All reactions