Total noob, but going crazy

50 foot fly by: im just starting this hobby and messing around. i have tried to figure this out on my own via research and videos. but nothing helps. im sure its a simple fix. im trying to get just the basic “test” example to run off the tft_espi library.
platform = espressif32
board = nodemcu-32s
framework = arduino
lib_deps = bodmer/TFT_eSPI@^2.5.43
thats how everything is currently set up but getting this error:
*** [.pio\build\nodemcu-32s\lib6a4\TFT_eSPI\TFT_eSPI.cpp.o] Error 1

im sure someone with more experience can help?
thanks in advance

Hi @rzapp18 !

Please show the complete error message.

The TFT_eSPI library must be configured.
Usually this is done by editing the User_Setup.h file located in the library folder.
Fortunately, there is a better way for PlatformIO by adding all necessary definitions to the build_flags in the platformio.ini.


platform = espressif32
board = nodemcu-32s
framework = arduino
lib_deps = 
build_flags =

You’ll find a description here TFT_eSPI/docs/PlatformIO/Configuring options.txt at master · Bodmer/TFT_eSPI · GitHub

I believe i configured the TFT_eSPI library correct (at this point im literally following a youtube tutorial) here is the full error message im getting.

In file included from lib/TFT_eSPI/TFT_eSPI.cpp:16:
lib/TFT_eSPI/TFT_eSPI.h:30:10: fatal error: SPI.H: No such file or directory
#include <SPI.H>
I did include SPI.H in the lib_deps, to see if anything changed. but still nothing.

Please remove this.
The SPI library is part of the ESP32 Arduino core of Espressif and no external SPI library is needed.

It sounds like you missed to add #include <Arduino.h> at the beginning of your sketch.

For details on converting Arduino projects to valid C/C++, please see the description in the documentation: Convert Arduino file to C++ manually.