Using TFT_eSPI with with Lilygo T-HMI 2.8 inch TFT #2675
StrandedAlien
started this conversation in
General
Replies: 1 comment
-
I had a look at the technical information for this display. GPIO 10 is the PWR EN (Power Enable) signal, this switches power to the display. TFT_eSPI does not support bespoke features like this so setting GPIO 10 high in the sketch is the correct approach. The touch support feature in TFT_eSPI is for SPI interface displays only (not parallel). To use the touch screen of the T-HMI board an additional library will be required. This one works well: See also examples here with a preconfigured version of TFT_eSPI: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
G'day, great library, impressive work. It is a real pity that i can't get touchscreen to work on my new T-HMI. Well, touch works using the examples without screen, but not together with the ST7789V TFT in parallel mode. I get this error:
In file included from /home/user/Arduino/libraries/TFT_eSPI/examples/GUI Widgets/Sliders/Slider_demo/Slider_demo.ino:10:
/home/user/Arduino/libraries/TFT_eSPI/TFT_eSPI.h:948:8: error: #error >>>>------>> Touch functions not supported in 8/16 bit parallel mode or with RP2040 PIO.
#error >>>>------>> Touch functions not supported in 8/16 bit parallel mode or with RP2040 PIO.
Link to board specs: https://www.lilygo.cc/products/t-hmi
Also kind of strange is that i need to add some code to get the original examples to run on this board. I need to set Pin 10 to high or black screen. Set to high all examples work as long as they do not use TFT and touchscreen together. So this works:
#include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI();
#define STONER 10
void setup() {
pinMode(STONER,OUTPUT);
digitalWrite(STONER, HIGH);
tft.init();
tft.setRotation(1);
tft.fillScreen(TFT_ORANGE);
}
void loop() {
tft.setCursor(30, 80, 2);
tft.setTextColor(TFT_RED,TFT_GREEN);
tft.setTextSize(4);
tft.println("HIGH HIGH!");
}
Delete the "STONER" lines and it does not work anymore. Needs to be HIGH. No joke.
I also have another setup with ILI9341 which does not have these problems. Maybe you could check when you find some time to do so. Keep up the awesome work. Cheers mate!
Beta Was this translation helpful? Give feedback.
All reactions