Personally, I don’t like having to edit library files. I therefore use the approach described in the Readme of the TFT_eSPI library and prefer to define the pins in platformio.ini
. This way, the settings for the project are retained and are not deleted or overwritten if the library changes.
Hi Boris, I tried using tft_espi with the platformio.ini definitions that you sent. nothing displayed on screen… Any idea? I am using v2.5.43…
Is there any relation to the following warning:
Compiling .pio\build\bpi_centi_s3\FrameworkArduino\esp32-hal-timer.c.o
In file included from C:/Users/motti/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:29,
from C:/Users/motti/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.c:15:
C:/Users/motti/.platformio/packages/framework-arduinoespressif32/variants/bpi_leaf_s3/pins_arduino.h:24: warning: “RGB_BRIGHTNESS” redefined
#define RGB_BRIGHTNESS 25
In file included from C:/Users/motti/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:95,
from C:/Users/motti/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.h:27,
from C:/Users/motti/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.c:15:
C:/Users/motti/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-rgb-led.h:11: note: this is the location of the previous definition
#define RGB_BRIGHTNESS 64
Also tried to execute the “julia-example” from Examples/Generic/Julia_Set and nothing was displayed…
Ok, rewind your platformio.ini
back to minimal:
[env:bpi_centi_s3]
platform = espressif32
board = bpi_centi_s3
framework = arduino
monitor_speed = 115200
lib_deps =
https://github.com/Bodmer/TFT_eSPI
Copy this User_Setup.h into the TFT_eSPI folder (.pio/libdeps/bpi_centi_s3/TFT_eSPI)
Nothing
Blank screen.
Maybe it relates to the error I reported earlier during commpile?
warning: “RGB_BRIGHTNESS” redefined
The warning can be ignored. It is not relevant here.
I have uploaded my working project to GitHub:
You need to copy the User_Setup.h to the TFT_eSPI library folder.
You may have to reset the board manually after uploading.
Hi Boris, your project now works. When first compiling and uploading, it did not work. I pushed reset and it did not work. Pushed it second time and it works. Really a strange behavior…
In my real project I am using the LilyGo T-Display-S3 (which also comes in a nice box) and it is much better in support and in behaving nicely.
I wanted to use the Centi becuase it uses the same MCU and screen size, but it adds the encoder and buzzer which should be really useful.
Will continue testing.
Thanks a lot for your help!