-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corrected forced version number for TFT_eSPI #4423
base: main
Are you sure you want to change the base?
Conversation
details, and force an older version of dependent library TFT_eSPI.
platform = ${esp32.platform} | ||
platform_packages = ${esp32.platform_packages} | ||
build_unflags = ${common.build_unflags} | ||
build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"ESP32\" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be something like WLED_T-Display for the release name to indicate this is not a vanilla ESP32 build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just fixed this - thanks!
Revised WLED_RELEASE_NAME to "WLED_T-Display"
Update platformio_override.ini
usermods/TTGO-T-Display/README.md
Outdated
@@ -87,5 +69,7 @@ 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. | |||
|
|||
Once the compilation is done and loaded onto the TTGO T-Display module, you may need to complete the initial setup of WLED via the AP interface, configure the WiFi settings, let it restart and then go to the LED preferences option in the WLED web interface. The Data GPIO pin needs to be set to pin 2 (or whatever pin you used), and then reboot WLED on the device. This should get the display working. I am unable to get the overrides to change the initial pin setting of 16 (which conflicts with the display). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"I am unable to get the overrides to change the initial pin setting of 16 (which conflicts with the display)."
@spiff72 using -D DATA_PINS=2
did not work?
Actually any build_flags for pin assignment will be overwritten by your cfg.json, so you'll need to wipe your device first if you want to test default pins assigned in build_flags.
WLED/platformio_override.sample.ini
Lines 61 to 70 in ae4de27
; PIN defines - uncomment and change, if needed: | |
; -D DATA_PINS=2 | |
; or use this for multiple outputs | |
; -D DATA_PINS=1,3 | |
; -D BTNPIN=0 | |
; -D IRPIN=4 | |
; -D RLYPIN=12 | |
; -D RLYMDE=1 | |
; -D RLYODRAIN=0 | |
; -D LED_BUILTIN=2 # GPIO of built-in LED |
; -D IRPIN=4 | ||
; -D RLYPIN=12 | ||
; -D RLYMDE=1 | ||
; -D WLED_DISABLE_BROWNOUT_DET | ||
;PIN defines - uncomment and change, if needed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 27 might be part of the problem you had with default pins - platformIO is very picky about indentations, and a comment starting at column 0 might be enough to "end" the multi-line string prematurely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed (hopefully)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that this issue has been fixed, and the data pin is being reassigned correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In summary, it's still a bit unclear to me where the display driver flags are added.
As the usermod proposes a platformio_override.ini to be used for esp32, the buildenv in this override file should be focussed on what's needed to configure the usermod.
Also I'd like to have all debug outputs use DEBUG_PRINTLN() instead of Serial.println()
usermods/TTGO-T-Display/usermod.cpp
Outdated
tft.print("mA (estimated)"); | ||
Serial.println("Print estimated current"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please
use DEBUG_PRINTLN for all debug outputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -92,10 +96,10 @@ bool displayTurnedOff = false; | |||
void userLoop() { | |||
|
|||
// Check if we time interval for redrawing passes. | |||
if (millis() - lastUpdate < USER_LOOP_REFRESH_RATE_MS) { | |||
if (millis() - lastUpdate_mod < USER_LOOP_REFRESH_RATE_MS) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does USER_LOOP_REFRESH_RATE_MS
come from?
I did not see it defined in the usermod (may I overlooked something)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's defined 5 lines prior (line 94)
#---------- | ||
# SAMPLE | ||
#---------- | ||
[env:WLED_T-Display] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we define the pins needed by the display driver?
defines in the usermod are commented out, so there should be a different place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pins needed by the display are defined in the TFT_eSPI library when the user_setup_select.h file is modified (as described in the readme.md file).
; -D LED_BUILTIN=2 # GPIO of built-in LED | ||
lib_deps = ${esp32.lib_deps} | ||
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line | ||
;TFT_eSPI @ 2.5.33 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any special reason that TFT library is commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - the following line is forcing an older version (2.1.4) instead.
monitor_filters = esp32_exception_decoder | ||
board_build.partitions = ${esp32.default_partitions} | ||
|
||
; # additional build flags for audioreactive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The part for audioreactive is outdated - please replace with the proposed flags from platformio_override.sample.ini
WLED/platformio_override.sample.ini
Lines 143 to 150 in ae4de27
; Use Audioreactive usermod and configure I2S microphone | |
; ${esp32.AR_build_flags} ;; default flags required to properly configure ArduinoFFT | |
; ;; don't forget to add ArduinoFFT to your libs_deps: ${esp32.AR_lib_deps} | |
; -D AUDIOPIN=-1 | |
; -D DMTYPE=1 # 0-analog/disabled, 1-I2S generic, 2-ES7243, 3-SPH0645, 4-I2S+mclk, 5-I2S PDM | |
; -D I2S_SDPIN=36 | |
; -D I2S_WSPIN=23 | |
; -D I2S_CKPIN=19 |
WLED/platformio_override.sample.ini
Line 32 in ae4de27
; ${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected.
@spiff72 another user has proposed some enhancements in Maybe both PRs should be merged together? |
I'm sorry, but I'm not sure what to make of this one (or what you are suggesting). I see that the platformi_override_sample.ini for that usermod appears to define a lot of the things needed for the (different) display that board uses, but I think it's better to have the user edit the file in the library as called out in the readme.md file. |
in platformio_override.ini