Code Monkey home page Code Monkey logo

t-hmi's Introduction

๐ŸŒŸT-HMI๐ŸŒŸ

Pinout

image

Quick Start

The board uses USB as the JTAG upload port. When printing serial port information on USB, CDC_ON_BOOT configuration needs to be turned on. If the port cannot be found when uploading the program or the USB has been used for other functions, the port does not appear. Please enter the upload mode manually.

  • Press and hold the BOOT button when the power is off, the button is located behind the RST button.
  • When the USB is connected, first press and hold the BOOT button, then click reset and then release the BOOT button

Arduino

  1. In Arduino Preferences, on the Settings tab, enter the https://espressif.github.io/arduino-esp32/package_esp32_index.json URL in the Additional boards manager URLs input box.
  2. Click OK and the software will install.
  3. Search for ESP32 in Tools โ†’ Board Manager and install ESP32-Arduino SDK (V 2.0.5 or above and below V3.0)
  4. Copy everything from this repository lib folder to Arduino library folder (e.g. C:\Users\YourName\Documents\Arduino\libraries)
  5. Select the correct settings in the Tools menu as shown below.
Setting Value
Board ESP32 S3 Dev Module
USB CDC On Boot Enabled
CPU Frequency 240MHz (WiFi)
Core Debug Level None
USB DFU On Boot Enabled
Events Run On Core 1
Flash Mode QIO 80MHz
Flash Size 16MB (128Mb)
JTAG Adapter Integrated USB JTAG
Arduino Runs On Core 1
USB Firmware MSC On Boot Disabled
Partition Scheme Huge APP (3MB No OTA/1MB SPIFFS)
PSRAM OPI PSRAM
USB Mode Hardware CDC and JTAG
Writing as a beginner:
  • When opening the Arduino IDE, you will be prompted that there are new libraries that can be updated. Please do not click update. There is no guarantee that it can be compiled, run, etc. after the update. Make sure that the board is running normally before deciding whether to update. You have to Know that problems may occur after updating due to library differences, or the default configuration (such as TFT_eSPI) will be overwritten.
  • If it runs abnormally after the update, please follow Article 4 of the Arduino Quick Start to delete the directory in libraries, and drag the folder in lib into the libraries directory again.

PlatformIO

  1. PlatformIO plug-in installation: click on the extension on the left column โ†’ search platformIO โ†’ install the first plug-in
  2. Click Platforms โ†’ Embedded โ†’ search Espressif 32 in the input box โ†’ select the corresponding firmware installation

Tips

  1. The board uses USB as the JTAG upload port. When printing serial port information on USB_CDC_ON_BOOT configuration needs to be turned on. If the port cannot be found when uploading the program or the USB has been used for other functions, the port does not appear. Please enter the upload mode manually.
    1. Connect the board via the USB cable
    2. Press and hold the BOOT button , While still pressing the BOOT button, press RST
    3. Release the RST
    4. Release the BOOT button
    5. Upload sketch
  2. If the above is invalid, burn the firmware to check whether the hardware is normal
  3. Powering up the T-HMI board via the 5V DC connector does not work
    • Looking at the schematic, we know that if you use an external 5V power supply, you need to bring a magnet close to the ReedSwitch and set the PowerOn Pin (GPIO14) to HIGH as soon as the chip starts.
     pinMode(14, OUTPUT);
     digitalWrite(14, HIGH);
  4. It can start normally when using USB power supply, but it cannot start when connected to the battery alone?
    • When using the battery alone, IO10 needs to be set to HIHG to work properly.
    pinMode(10, OUTPUT);
    digitalWrite(10, HIGH);

t-hmi's People

Contributors

lbuque avatar lewisxhe avatar lilygo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

t-hmi's Issues

Micropython

Will there be a version of Micropython for this board with drivers from lhttps://github.com/russhughes ?

Installing T-HMI

I am trying to follow the installation process described in the Readme file.

It says search for the ESP-ARDUINO SDK and install it.

This differs from the T-Display S3 that says to install the ESP32S3 DEV MODULE.

IS ESP-ARDUINO SDK a generic description for one of the options that appear on the menu?

Which board?

For Arduino IDE, which Board should be selected? During sketch upload I get following error:

esptool.py v3.0-dev
Serial port COM17
Connecting...
WARNING: This chip doesn't appear to be a ESP32 (date codes 0x03700000:0x00000000). Probably it is unsupported by this version of esptool.
Chip is ESP32-D0WDQ6 (revision 0)
Features: WiFi, BT, Dual Core, Coding Scheme None
WARNING: Detected crystal freq 0.00MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?
Crystal is 26MHz
MAC: 00:00:00:00:00:00
Uploading stub...
Running stub...

A fatal error occurred: Invalid head of packet (0x47)
Failed uploading: uploading error: exit status 2

Powering up the T-HMI board via the 5V DC connector does not work

Hi,

As long as I power the board via the USB-C connector everything works fine. I've integrated T-HMI with Home Assistant via ESPHome and I'm happy with the overall results.

However, when I'm trying to power up the board via the 5V DC connector, the board doesn't seem to boot up. The little red LED also does not light up. I measured the voltage on the board, it definitely gets power.

I was in a similar position with a T-Display S3 board and realized that I need to set the GPIO15 HIGH on boot for the board to work with the DC connector. On the T-HMI I've tried setting GPIO10 (PWR_EN) and GPIO14 (PWR_ON) to HIGH on boot, but unfortunately the board does not power up.

I can't debug things further, because I would need to plug in the USB-C connector. But, if I do that, the board will get power via USB...

Is there any other GPIO pin that needs to be set in a certain way for the power to work via the DC connector?

Thank you!

firmware

please add firmware.bin in branch, so that we can restore to OEM status. Thanks

STEP 3D model

Hello @LilyGO,

It would be extremely helpful to have a STEP file for easier integration of the T-HMI board in the device design. Would it be possible for you to upload the STEP file of the T-HMI board?

Thank you for considering this request.

ESPHome

How can I get this working in EspHome/Homeassistant?

i2c port configuration

hello ,i m using t-hmi and i want to connected with an SHT30 ,but i can't find i2c port .How can i set up the i2c port

screen goes black and usb serial becomes unstable after enabling 1-bit microsd

when enabling 1-bit microsd in a custom app with the microsd inserted the display goes black and the serial port becomes unstable and doesn't allow flashing firmware after.

the t-hmi can be recovered by entering the upload mode manually before uploading firmware: i.e. press and hold the BOOT button and press RST button once, release the RST then release the BOOT button

i returned to the examples and after formatting 3 different fat32 microsd cards, an 8, 16, and 32 gb but none could be recognized using the factory app and then used examples/sd/sd.ino example and reproduced the failure.

aware of and read this issue

Lot of errors compiling tft example

Hi, I'm testing the T-HMI with Arduino IDE 2.2.1 and get a lot of errors when compiling the tft example from T-HMI-master.
I have copied all the folders and file from "lib" to my Arduino libraries folder.
`In file included from /xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:20:
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.c: In member function 'uint8_t TFT_eSPI::readByte()':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.c:96:8: error: 'gpio_get_level' was not declared in this scope
96 | b = gpio_get_level((gpio_num_t)TFT_D0); // Read three times to allow for bus access time
| ^~~~~~~~~~~~~~
In file included from /xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.h:96,
from /xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:16:
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.c: In member function 'void TFT_eSPI::pushBlock(uint16_t, uint32_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.c:543:5: note: in expansion of macro 'tft_Write_16'
543 | tft_Write_16(color);
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.c:554:23: note: in expansion of macro 'tft_Write_16'
554 | else while (len--) {tft_Write_16(color);}
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.c: In member function 'void TFT_eSPI::pushSwapBytePixels(const void*, uint32_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.c:564:20: note: in expansion of macro 'tft_Write_16'
564 | while ( len-- ) {tft_Write_16(data); data++;}
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.c: In member function 'void TFT_eSPI::pushPixels(const void
, uint32_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.c:574:37: note: in expansion of macro 'tft_Write_16'
574 | if(_swapBytes) { while ( len-- ) {tft_Write_16(*data); data++; } }
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:436:32: note: in expansion of macro 'GPIO_CLR_REG'
436 | #define tft_Write_16S(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 0)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.c:575:27: note: in expansion of macro 'tft_Write_16S'
575 | else { while ( len-- ) {tft_Write_16S(data); data++;} }
| ^~~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'void TFT_eSPI::begin_tft_write()':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:225:22: error: 'GPIO' was not declared in this scope
225 | #define CS_L GPIO.out_w1tc = (1 << TFT_CS)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:80:5: note: in expansion of macro 'CS_L'
80 | CS_L;
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'virtual void TFT_eSPI::begin_nin_write()':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:225:22: error: 'GPIO' was not declared in this scope
225 | #define CS_L GPIO.out_w1tc = (1 << TFT_CS)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:92:5: note: in expansion of macro 'CS_L'
92 | CS_L;
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'void TFT_eSPI::end_tft_write()':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:226:22: error: 'GPIO' was not declared in this scope
226 | #define CS_H GPIO.out_w1ts = (1 << TFT_CS)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:106:7: note: in expansion of macro 'CS_H'
106 | CS_H;
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'virtual void TFT_eSPI::end_nin_write()':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:226:22: error: 'GPIO' was not declared in this scope
226 | #define CS_H GPIO.out_w1ts = (1 << TFT_CS)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:121:7: note: in expansion of macro 'CS_H'
121 | CS_H;
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'void TFT_eSPI::begin_tft_read()':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:225:22: error: 'GPIO' was not declared in this scope
225 | #define CS_L GPIO.out_w1tc = (1 << TFT_CS)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:147:4: note: in expansion of macro 'CS_L'
147 | CS_L;
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'void TFT_eSPI::end_tft_read()':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:226:22: error: 'GPIO' was not declared in this scope
226 | #define CS_H GPIO.out_w1ts = (1 << TFT_CS)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:169:24: note: in expansion of macro 'CS_H'
169 | if(!inTransaction) {CS_H;}
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'void TFT_eSPI::spiwrite(uint8_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:412:27: note: in expansion of macro 'GPIO_CLR_REG'
412 | #define tft_Write_8(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t)(C)); WR_H
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:970:3: note: in expansion of macro 'tft_Write_8'
970 | tft_Write_8(c);
| ^~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'void TFT_eSPI::writecommand(uint8_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:167:20: error: 'GPIO' was not declared in this scope
167 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:984:3: note: in expansion of macro 'DC_C'
984 | DC_C;
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'void TFT_eSPI::writedata(uint8_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:168:20: error: 'GPIO' was not declared in this scope
168 | #define DC_D GPIO.out_w1ts = (1 << TFT_DC)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:1047:3: note: in expansion of macro 'DC_D'
1047 | DC_D; // Play safe, but should already be in data mode
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'uint8_t TFT_eSPI::readcommand8(uint8_t, uint8_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:225:22: error: 'GPIO' was not declared in this scope
225 | #define CS_L GPIO.out_w1tc = (1 << TFT_CS)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:1070:3: note: in expansion of macro 'CS_L'
1070 | CS_L;
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'virtual uint16_t TFT_eSPI::readPixel(int32_t, int32_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:225:22: error: 'GPIO' was not declared in this scope
225 | #define CS_L GPIO.out_w1tc = (1 << TFT_CS)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:1148:25: note: in expansion of macro 'CS_L'
1148 | if (!inTransaction) { CS_L; } // CS_L can be multi-statement
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:226:22: error: 'GPIO' was not declared in this scope
226 | #define CS_H GPIO.out_w1ts = (1 << TFT_CS)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:1180:27: note: in expansion of macro 'CS_H'
1180 | if (!inTransaction) { CS_H; } // CS_H can be multi-statement
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'void TFT_eSPI::readRect(int32_t, int32_t, int32_t, int32_t, uint16_t
)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:225:22: error: 'GPIO' was not declared in this scope
225 | #define CS_L GPIO.out_w1tc = (1 << TFT_CS)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:1279:3: note: in expansion of macro 'CS_L'
1279 | CS_L;
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'virtual void TFT_eSPI::drawChar(int32_t, int32_t, uint16_t, uint32_t, uint32_t, uint8_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:3216:32: note: in expansion of macro 'tft_Write_16'
3216 | if (column[k] & mask) {tft_Write_16(color);}
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:3217:15: note: in expansion of macro 'tft_Write_16'
3217 | else {tft_Write_16(bg);}
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:3220:7: note: in expansion of macro 'tft_Write_16'
3220 | tft_Write_16(bg);
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'virtual void TFT_eSPI::setWindow(int32_t, int32_t, int32_t, int32_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:167:20: error: 'GPIO' was not declared in this scope
167 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:3480:5: note: in expansion of macro 'DC_C'
3480 | DC_C; tft_Write_8(TFT_CASET);
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'void TFT_eSPI::readAddrWindow(int32_t, int32_t, int32_t, int32_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:167:20: error: 'GPIO' was not declared in this scope
167 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:3556:3: note: in expansion of macro 'DC_C'
3556 | DC_C; tft_Write_8(TFT_CASET);
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'virtual void TFT_eSPI::drawPixel(int32_t, int32_t, uint32_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:167:20: error: 'GPIO' was not declared in this scope
167 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:3756:7: note: in expansion of macro 'DC_C'
3756 | DC_C; tft_Write_8(TFT_CASET);
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:167:20: error: 'GPIO' was not declared in this scope
167 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:3763:7: note: in expansion of macro 'DC_C'
3763 | DC_C; tft_Write_8(TFT_PASET);
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:167:20: error: 'GPIO' was not declared in this scope
167 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:3769:3: note: in expansion of macro 'DC_C'
3769 | DC_C; tft_Write_8(TFT_RAMWR);
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'virtual void TFT_eSPI::pushColor(uint16_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:596:25: note: in expansion of macro 'tft_Write_16'
596 | #define tft_Write_16N tft_Write_16
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:3790:3: note: in expansion of macro 'tft_Write_16N'
3790 | tft_Write_16N(color);
| ^~~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp: In member function 'virtual int16_t TFT_eSPI::drawChar(uint16_t, int32_t, int32_t, uint8_t)':
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:5317:31: note: in expansion of macro 'tft_Write_16'
5317 | if (line & mask) {tft_Write_16(textcolor);}
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:5318:19: note: in expansion of macro 'tft_Write_16'
5318 | else {tft_Write_16(textbgcolor);}
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:5323:18: note: in expansion of macro 'tft_Write_16'
5323 | if (pX) {tft_Write_16(textbgcolor);}
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:5372:30: note: in expansion of macro 'tft_Write_16'
5372 | while (tnp--) {tft_Write_16(textcolor);}
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:356:26: error: 'GPIO' was not declared in this scope
356 | #define GPIO_CLR_REG GPIO.out1_w1tc.val
| ^~~~
/xxx/Arduino/libraries/TFT_eSPI/Processors/TFT_eSPI_ESP32_S3.h:432:31: note: in expansion of macro 'GPIO_CLR_REG'
432 | #define tft_Write_16(C) GPIO_CLR_REG = GPIO_OUT_CLR_MASK; GPIO_SET_REG = set_mask((uint8_t) ((C) >> 8)); WR_H;
| ^~~~~~~~~~~~
/xxx/Arduino/libraries/TFT_eSPI/TFT_eSPI.cpp:5374:19: note: in expansion of macro 'tft_Write_16'
5374 | else {tft_Write_16(textcolor);}
| ^~~~~~~~~~~~

exit status 1
Compilation error: exit status 1`

Thanks in advance if someone has an idea of what's going on...
Andrea

No touch AND screen on T-HMI. However no problem using SPI ILI9341. How come?

Real pity, such a nice piece of HW. Had a problem to run the original TFT_eSPI examples at all and found a solution...set PIN 10 to high. Does not help with the touch, see my issue which i already added to TFT_eSPI in Bodmers repository. I do not know whether it is the board or the code. So please have a look at my description of the error:

Bodmer/TFT_eSPI#2669

Separately used, programs with touch work and prog's with screen work, but not together.

Micro sd

Hello,

You provide only 3 different pin for tf card but need mimimum 4 ?

Thanks

image jpg bmp

Hi,
Witch tools did you use to make image .h from jpg?
I found something (Img2Lcd) but not transform ok.
Thanks

T-hmi in esp-idf example ST7789

Hi buds,

Im using esp-idf for this t-hmi, is there any lib or example of accessing the ST7789 lcd & touch? Since i see here only the arduino examples, can anyone help with clue on how to shift these codes to esp-idf?

Many thanks,

factory example not work on lilygo t-display-s3

I bought this item from aliexpress and it arrive with and example loaded on it and it works ok with next button witch changes the pages.

https://www.aliexpress.com/item/1005005719816754.html?spm=a2g0o.order_list.order_list_main.49.322f1802oPFKyW

After other loaded schetches i loaded from t-hmi library the factory example. it remain in first page with FC CE image shows, the button not works and it remain in this status on serial monitor:

19:39:02.970 -> Turn on the main power
19:39:02.970 -> Power on peripherals, such as the LCD backlight
19:39:02.970 -> Initialize the power button
19:39:02.970 -> Initialize Intel 8080 bus
19:39:02.970 -> Install LCD driver of st7789
19:39:02.970 -> Initialize LCD driver of st7789
19:39:03.102 -> Turn on the LCD backlight
19:39:06.081 -> Initialize touch screen calibration data
19:39:06.081 -> point_1:
19:39:06.081 -> raw_x: 411 raw_y: 1246
19:39:06.081 -> point_2:
19:39:06.081 -> raw_x: 284 raw_y: 207
19:39:06.081 -> point_3:
19:39:06.081 -> raw_x: 320 raw_y: 223
19:39:06.081 -> point_4:
19:39:06.081 -> raw_x: 342 raw_y: 224
19:39:06.081 -> Initialize the touch screen
19:39:06.081 -> Initialize lvgl

Please help me with your adive what it is wrong in sketch. Thanks in advance.

What do you mean in ReadMe? SDK?

"3. Search for ESP32 in Tools โ†’ Board Manager and install ESP32-Arduino SDK (V 2.0.5 or above, V3.0 or below) (???)"

It is the same as LilyGO T-Display S3 but the ReadMe for T-HMI is confusing. The two boards are almost identical except for the obvious LCD size and extra I2C ports. Almost anything learned from familiarity with the LilyGO T-Display S3 is applicable to the T-HMI. The ReadMe could be the same for both, except pinout and LCD size.

Possibly you meant to say Arduino ESP Boards and select board type ESP32S3 Dev Module?
The Arduino IDE does not list the unstable ESP32 3.0. maybe you meant to say "(V 2.0.5 or above and below V3.0)" ?

Therefore I would like to see both ReadMe standardized, to lessen unneeded confusion.
-Terry

Text Offset when rotation is set to 3.

The text is offset from the side of the screen when setRotation is set to 3, the background fills the full screen. I tried tft.setAddrWindow to update the window size.

#include "pins.h"

#include <TFT_eSPI.h>
#include <OneButton.h>
#include <Arduino.h>

TFT_eSPI tft = TFT_eSPI();
OneButton buttonOK(21, false, false);

void setup() {
    pinMode(PWR_ON_PIN, OUTPUT);
    digitalWrite(PWR_ON_PIN, HIGH);

    Serial.begin(115200);
    delay(1000);

    
    buttonOK.attachClick(power_off);
    buttonOK.attachLongPressStop(power_off);
    // pinMode(21, INPUT)
    Serial.println("setup");
    
    tft.begin();
    tft.setRotation(1);
    tft.setSwapBytes(true);
    tft.setTextSize(1);
    tft.fillScreen(TFT_GREEN);
    tft.setTextColor(TFT_GREEN, TFT_BLACK);
    
    pinMode(PWR_EN_PIN, OUTPUT);
    digitalWrite(PWR_EN_PIN, HIGH);
    pinMode(BK_LIGHT_PIN, OUTPUT);
    digitalWrite(BK_LIGHT_PIN, HIGH);

    tft.drawString("Booting", 0, 0, 2);
    delay(3000);
}


void power_off() {
    digitalWrite(PWR_ON_PIN, LOW);
    Serial.println("power_off");
    digitalWrite(BK_LIGHT_PIN, LOW);
}


void loop() {
    // buttonOK.tick();
    // delay(10);
    // digitalWrite(BK_LIGHT_PIN, HIGH);
    // tft.setRotation(1);
    tft.setAddrWindow(20,0,240,320);
    for(int i = 0; i<5; i++) {
        tft.setRotation(i);
        Serial.println(i);
        tft.fillScreen(TFT_GREEN);
        tft.setTextColor(TFT_MAGENTA);
        tft.drawNumber(millis(), 0, 100, 4);
        delay(2000);
    }
}

wrong manual

in readme you say 4) Copy everything from this repository lib folder....
but you have no "repository lib folder" in you branch ?!.

Now you even removed the links to all the Libs needed (e.g. touch)...

Sorry, please imprvove, as I cannot use is as it is....graphics still not running

SPI

Is it possible to connect an SPI device to the T-HMI?

If so which pins could I use?

4 pins connector

What is the 4 pins connector type/reference.

It's sems, it's not standard Mini Micro JST

Thank's for your answer

unable to program t-hmi device

I have selected Arduino IDE 2.x with "ESP32S3 Dev Module", 16MB flash, hughe app. I use a simple sketch opening the serial port and writing to it. Compilatoin is fine, upload ok but the serial moniro only shows this:
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4201e6fa
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x43c
load:0x403c9700,len:0xbec
load:0x403cc700,len:0x2a3c
SHA-256 comparison failed:
Calculated: 74cb8a0835ff948a23b1fa30f5641bd3d3fc50d3e848150763aab2d791fb9d34
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98d8

Sketch:

void setup() {
  Serial.begin(115200);
  Serial.println("Hello T-HMI");
}
void loop() {
  Serial.print(".");
  delay(100);
}

this is wierd

connection error

hello
After my fifth attempt to upload my code to T-HMI ,i have this errors :
Le croquis utilise 269221 octets (8%) de l'espace de stockage de programmes. Le maximum est de 3145728 octets.
Les variables globales utilisent 19288 octets (5%) de mรฉmoire dynamique, ce qui laisse 308392 octets pour les variables locales. Le maximum est de 327680 octets.
esptool.py v4.5.1
Serial port COM4
Connecting...
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 34:85:18:aa:d3:60
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600

A fatal error occurred: No serial data received.
Failed uploading: uploading error: exit status 2
there is my configuration
image

Power up off of battery

Is there any way to power this up with a battery only every time i plug in a battery i need to jumpstart it basically to get the code running then it is good to go. Is there any way to just plug a battery in though?

Clone/Copy

I have worked with a TTGO T Beam before, new to using this T-HMI.
Is it possible to copy a flashed image from a T-HMI and flash it to another T-HMI? Sorry if this isnโ€™t the place to ask.

Grafics problem

try now differnet examples...but failed with any graphics.....eg.; LV:Benchmark.ino result in error:

In file included from c:\users\marti\documents\arduino\libraries\lvgl\src/misc/lv_log.h:16,
from c:\users\marti\documents\arduino\libraries\lvgl\lvgl.h:25,
from c:\Users\Marti\Documents\Arduino\libraries\lvgl\src/lvgl.h:17,
from C:\tmp\T-HMI-master\T-HMI-master\examples\lv_benchmark\benchmark\lv_demo_benchmark.h:16,
from C:\tmp\T-HMI-master\T-HMI-master\examples\lv_benchmark\lv_benchmark.ino:11:
c:\users\marti\documents\arduino\libraries\lvgl\src\lv_conf_internal.h:41:18: fatal error: ../../lv_conf.h: No such file or directory
#include "../../lv_conf.h" /Else assume lv_conf.h is next to the lvgl folder/
^~~~~~~~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: exit status 1

I installed all 4 libraries!!! does not work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.