This usermod enables use of the TTGO 240x135 T-Display ESP32 module for controlling WLED and showing the following information:
Button pin is mapped to the onboard button adjacent to the reset button of the TTGO T-Display board.
I have designed a 3D printed case around this board and an "ElectroCookie" project board, a level shifter, a buck regulator, and a DC power jack. I use 12V WS2815 LED strips for my projects, and power them with 12V power supplies. The regulator supplies 5V for the ESP module and the level shifter. If there is any interest in this case which elevates the board and display on custom extended standoffs to place the screen at the top of the enclosure (with accessible buttons), let me know, and I will post the STL files. It is a bit tricky to get the height correct, so I also designed a one-time use 3D printed solder fixture to set the board in the right location and at the correct height for the housing. (It is one-time use because it has to be cut off after soldering to be able to remove it). I didn't think the effort to make it in multiple pieces was worthwhile.
Based on a rework of the ssd1306_i2c_oled_u8g2 usermod from the WLED repo.
Functionality checked with:
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
...
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:
# Release binaries
; default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, esp32s2_saola, esp32c3
and uncomment the following line in the 'Single binaries' section:
default_envs = esp32dev
Save the platformio.ini
file. Once saved, the required library files should be automatically downloaded for modifications in a later step.
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).
You 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:
//#include <User_Setup.h> // Default setup is root library folder
#include <User_Setups/Setup25_TTGO_T_Display.h> // Setup file for ESP32 and TTGO T-Display ST7789V SPI bus TFT
Build the file. 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
try building again. Sometimes this happens on the first build attempt and subsequent attempts build correctly.
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Комментарий ( 0 )