TFT_eSPI can be installed in two ways depending on your development environment. Arduino IDE users can install it directly from the built-in Library Manager with a single search-and-click workflow. PlatformIO users declare the dependency inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Marcussacapuces91/doc-TFT_eSPI/llms.txt
Use this file to discover all available pages before exploring further.
platformio.ini and the toolchain fetches it automatically during build. Both methods get you the same library, but PlatformIO offers the additional advantage of keeping per-project configuration files separate from your global library folder.
Arduino IDE
Open the Library Manager
In the Arduino IDE menu, navigate to Sketch → Include Library → Manage Libraries… (or press
Ctrl+Shift+I on Windows/Linux, ⌘+Shift+I on macOS) to open the Library Manager panel.Search for TFT_eSPI
Type
TFT_eSPI in the search box. The library by Bodmer will appear at the top of the results. Confirm the author name matches to avoid installing an unrelated package.Install the library
Click the Install button next to the latest version. The IDE will download and place the library in your Arduino libraries folder:
- Windows:
C:\Users\<username>\Documents\Arduino\libraries\TFT_eSPI\ - macOS:
~/Documents/Arduino/libraries/TFT_eSPI/ - Linux:
~/Arduino/libraries/TFT_eSPI/
Configure for your hardware
Before uploading any sketch, open
User_Setup.h inside the installed library folder and configure it for your specific display and pin wiring. See the Configuration guide for full details.PlatformIO
Open or create platformio.ini
Every PlatformIO project contains a
platformio.ini file at the project root. Open it in your editor — if starting a new project, PlatformIO IDE will have generated one for you.Add TFT_eSPI to lib_deps
Under your
[env:...] section, add TFT_eSPI to the lib_deps key. PlatformIO will resolve and download the library from its registry on the next build.Add display configuration via build_flags
PlatformIO lets you define TFT_eSPI settings on a per-project basis using
build_flags instead of editing the shared User_Setup.h. This keeps your configuration inside your project repository and safe from library upgrades.When using the
build_flags approach in PlatformIO you must set -D USER_SETUP_LOADED=1 first. This preprocessor flag tells TFT_eSPI to skip loading User_Setup.h entirely and use only the definitions supplied by your build flags. Without it the library will still read User_Setup.h and your flags may conflict.