mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2025-07-31 11:17:32 +02:00
Update TFT_eSPI_ID1559 to TFT_eSPI
@ -15,7 +15,7 @@ There are different ways to include libraries in PlatformIO, but the simplest wa
|
||||
|
||||

|
||||
|
||||
PlatformIO will automatically download and install TFT_eSPI in your project the next time you build. Library files will be stored in `.pio/libdeps/env_name/TFT_eSPI_ID1559/` inside the project directory.
|
||||
PlatformIO will automatically download and install TFT_eSPI in your project the next time you build. Library files will be stored in `.pio/libdeps/env_name/TFT_eSPI/` inside the project directory. (Older versions might use `TFT_eSPI_ID1559` instead of `TFT_eSPI` in the path.)
|
||||
|
||||
*More info on `lib_deps` [here](https://docs.platformio.org/en/latest/projectconf/section_env_library.html).*
|
||||
|
||||
@ -27,13 +27,13 @@ One cool thing about PlatformIO is that we can modify the library settings witho
|
||||
We can achieve this by using PlatformIO's [`build_flags`](https://docs.platformio.org/en/latest/projectconf/section_env_build.html). Instead of using #define, as you would in regular C/C++ files, use the -D prefix.
|
||||
|
||||
- First of all, we prevent user settings headers to be loaded by defining `USER_SETUP_LOADED`. **Aways define `USER_SETUP_LOADED` if using `build_flags` with the TFT_eSPI library**.
|
||||
- Next include the User_SetupXX_XXXX.h file that matches your configuration. Use `-include $PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI_ID1559/User_Setups/SetupXX_XXXX.h`
|
||||
- Next include the User_SetupXX_XXXX.h file that matches your configuration. Use `-include $PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI/User_Setups/SetupXX_XXXX.h`. (You might have to use `TFT_eSPI_ID1559` instead of `TFT_eSPI`.)
|
||||
|
||||
Your _build_flags_ now looks like this:
|
||||
```INI
|
||||
build_flags =
|
||||
-D USER_SETUP_LOADED=1
|
||||
-include $PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI_ID1559/User_Setups/Setup1_ILI9341.h
|
||||
-include $PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI/User_Setups/Setup1_ILI9341.h
|
||||
```
|
||||
|
||||
- Optionally you can create your custom setup by defining the needed settings, here is an example:
|
||||
@ -67,7 +67,7 @@ The final `platformio.ini` file may look like this:
|
||||
; TFT_eSPI library setting here (no need to edit library files):
|
||||
;###############################################################
|
||||
-D USER_SETUP_LOADED=1 ; Set this settings as valid
|
||||
-include $PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI_ID1559/User_Setups/Setup1_ILI9341.h
|
||||
-include $PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI/User_Setups/Setup1_ILI9341.h
|
||||
```
|
||||
- Custom setup:
|
||||
```INI
|
||||
|
Reference in New Issue
Block a user