WLED/usermods/TTGO-T-Display
Jeff Rescignano 6ded0cce12
[ImgBot] Optimize images (#1238)
*Total -- 2,546.93kb -> 2,358.92kb (7.38%)

/images/wled_logo_clean.png -- 2.48kb -> 0.59kb (76.3%)
/usermods/Enclosure_with_OLED_temp_ESP07/assets/pcb.png -- 235.03kb -> 201.10kb (14.43%)
/images/wled_logo.png -- 46.43kb -> 40.20kb (13.41%)
/images/wled_logo_akemi.png -- 24.41kb -> 21.60kb (11.5%)
/usermods/TTGO-T-Display/assets/ttgo_hardware1.png -- 685.48kb -> 613.17kb (10.55%)
/usermods/Enclosure_with_OLED_temp_ESP07/assets/controller.jpg -- 149.82kb -> 136.31kb (9.02%)
/usermods/battery_keypad_controller/assets/bat-key-ctrl-1.jpg -- 318.82kb -> 298.56kb (6.36%)
/usermods/battery_keypad_controller/assets/bat-key-ctrl-3.jpg -- 343.93kb -> 322.75kb (6.16%)
/usermods/battery_keypad_controller/assets/bat-key-ctrl-2.jpg -- 250.06kb -> 235.49kb (5.83%)
/images/macbook-pro-space-gray-on-the-wooden-table.jpg -- 490.48kb -> 489.15kb (0.27%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-10-09 12:48:19 +02:00
..
assets [ImgBot] Optimize images (#1238) 2020-10-09 12:48:19 +02:00
platformio_override.ini New usermod to support the TTGO T-Display (ESP32 based board with integrated TFT display) (#957) 2020-05-30 09:22:31 +02:00
README.md Updated Readme.md file (#965) 2020-06-05 14:22:03 +02:00
usermod.cpp New usermod to support the TTGO T-Display (ESP32 based board with integrated TFT display) (#957) 2020-05-30 09:22:31 +02:00

TTGO T-Display ESP32 with 240x135 TFT via SPI with TFT_eSPI

This usermod allows use of the TTGO T-Display ESP32 module with integrated 240x135 display for controlling WLED and showing the following information:

  • Current SSID
  • IP address if obtained
    • in AP mode and turned off lightning AP password is shown
  • Current effect
  • Current palette

Usermod based on a rework of the ssd1306_i2c_oled_u8g2 usermod from the WLED repo.

Hardware

Hardware

Github reference for TTGO-Tdisplay

Requirements

Functionality checked with:

  • TTGO T-Display
  • PlatformIO
  • Group of 4 individual Neopixels from Adafruit, and a full string of 68 LEDs.

Platformio Requirements

Platformio.ini changes

Under the root folder of the project, in the platformio.ini file, uncomment the TFT_eSPI line within the [common] section, under lib_deps:

# platformio.ini
...
[common]
...
lib_deps =
    ...
  #For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line  
    #TFT_eSPI
...

Also, while in the platformio.ini file, you must change the environment setup to build for just the esp32dev platform as follows:

Comment out the line described below:

# Travis CI binaries (comment this out when building for single board)
; default_envs = travis_esp8266, esp01, esp01_1m_ota, travis_esp32

and UNCOMMENT the following line in the 'Single binaries' section:

default_envs = esp32dev

Save the platformio.ini file. Once this is saved, the required library files should be automatically downloaded for modifications in a later step.

Platformio_overrides.ini (added)

Copy the platformio_overrides.ini file which is contained in the usermods/TTGO-T-Display/ folder into the root of your project folder. This file contains an override that remaps the button pin of WLED to use the on-board button to the right of the USB-C connector (when viewed with the port oriented downward - see hardware photo).

TFT_eSPI Library Adjustments (board selection)

We need to modify a file in the TFT_eSPI library to select the correct board. If you followed the directions to modify and save the platformio.ini file above, the User_Setup_Select.h file can be found in the /.pio/libdeps/esp32dev/TFT_eSPI_ID1559 folder.

Modify the User_Setup_Select.h file as follows:

  • Comment out the following line (which is the 'default' setup file):
//#include <User_Setup.h>           // Default setup is root library folder
  • Uncomment the following line (which points to the setup file for the TTGO T-Display):
#include <User_Setups/Setup25_TTGO_T_Display.h>    // Setup file for ESP32 and TTGO T-Display ST7789V SPI bus TFT

Run the build and it should complete correctly. If you see a failure like this:

xtensa-esp32-elf-g++: error: wled00\wled00.ino.cpp: No such file or directory
xtensa-esp32-elf-g++: fatal error: no input files

Just try building again - I find that sometimes this happens on the first build attempt and subsequent attempts will build correctly.

Arduino IDE

  • UNTESTED