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.
[env:nodemcu-32s]
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.

Example:

[env:nodemcu-32s]
platform = espressif32
board = nodemcu-32s
framework = arduino
lib_deps = 
  bodmer/TFT_eSPI@^2.5.43
build_flags =
  -DUSER_SETUP_LOADED=1
  -DST7789_DRIVER=1
  -DTFT_WIDTH=128
  -DTFT_HEIGHT=160
  -DTFT_MISO=19
  -DTFT_MOSI=23
  -DTFT_SCLK=18
  -DTFT_CS=5
  -DTFT_DC=19
  -DTFT_RST=4
  -DLOAD_GLCD=1
  -DLOAD_FONT2=1
  -DLOAD_FONT4=1
  -DLOAD_FONT6=1
  -DLOAD_FONT7=1
  -DLOAD_FONT8=1
  -DLOAD_GFXFF=1
  -DSMOOTH_FONT=1
  -DSPI_FREQUENCY=27000000

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.