Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adjustments based on feedback
  • Loading branch information
spiff72 committed Jan 5, 2025
commit 3325b0b50d007da69da9b589a42e9b7e5d346b1f
25 changes: 16 additions & 9 deletions usermods/TTGO-T-Display/platformio_override.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ build_flags = ${common.build_flags} ${esp32.build_flags} -D WLED_RELEASE_NAME=\"
; -D IRPIN=4
; -D RLYPIN=12
; -D RLYMDE=1
; -D WLED_DISABLE_BROWNOUT_DET
; -D WLED_DISABLE_BROWNOUT_DET
;PIN defines - uncomment and change, if needed:
Copy link
Collaborator

@softhack007 softhack007 Jan 4, 2025

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed (hopefully)

Copy link
Contributor Author

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.

-D DATA_PINS=2
;or use this for multiple outputs
;-D DATA_PINS=1,3
; -D DATA_PINS=1,3
-D BTNPIN=35
; -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 RLYODRAIN=0
; -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
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Expand All @@ -44,6 +44,13 @@ monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}

; # additional build flags for audioreactive
Copy link
Collaborator

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

; 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

; ${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected.

; AR_build_flags = -D USERMOD_AUDIOREACTIVE
; -D sqrt_internal=sqrtf ;; -fsingle-precision-constant ;; forces ArduinoFFT to use float math (2x faster)
; 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
; ${esp32.AR_lib_deps} ;; needed for USERMOD_AUDIOREACTIVE
; AR_lib_deps = kosme/arduinoFFT @ 2.0.1
18 changes: 9 additions & 9 deletions usermods/TTGO-T-Display/usermod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ TFT_eSPI tft = TFT_eSPI(135, 240); // Invoke custom library
//gets called once at boot. Do all initialization that doesn't depend on network here
void userSetup() {
Serial.begin(115200);
Serial.println("Start");
DEBUG_PRINTLN("Start");
tft.init();
tft.setRotation(3); //Rotation here is set up for the text to be readable with the port on the left. Use 1 to flip.
tft.fillScreen(TFT_BLACK);
Expand All @@ -61,7 +61,7 @@ void userSetup() {
tft.setTextSize(3);
//tft.setTextSize(1);
tft.print("Loading...");
Serial.println("Loading...");
DEBUG_PRINTLN("Loading...");

if (TFT_BL > 0) { // TFT_BL has been set in the TFT_eSPI library in the User Setup file TTGO_T_Display.h
pinMode(TFT_BL, OUTPUT); // Set backlight pin to output mode
Expand Down Expand Up @@ -161,7 +161,7 @@ void userLoop() {
// tft.print(apPass);
// else
// tft.print(knownIp);
Serial.println("Print known AP");
DEBUG_PRINTLN("Print known AP");
if (apActive) {
tft.print("AP IP: ");
tft.print(knownIp);
Expand All @@ -170,7 +170,7 @@ void userLoop() {
tft.print(apPass);
}
else {
Serial.println("Print IP");
DEBUG_PRINTLN("Print IP");
tft.print("IP: ");
tft.print(knownIp);
tft.setCursor(1,46);
Expand All @@ -186,23 +186,23 @@ void userLoop() {
char lineBuffer[tftcharwidth+1];
extractModeName(knownMode, JSON_mode_names, lineBuffer, tftcharwidth);
tft.print(lineBuffer);
Serial.println("Print mode name");
DEBUG_PRINTLN("Print mode name");

// Fourth row with palette name
tft.setCursor(1, 90);
extractModeName(knownPalette, JSON_palette_names, lineBuffer, tftcharwidth);
tft.print(lineBuffer);
Serial.println("Print palette");
DEBUG_PRINTLN("Print palette");

// Fifth row with estimated mA usage
tft.setCursor(1, 112);
// Print estimated milliamp usage (must specify the LED type in LED prefs for this to be a reasonable estimate).
//tft.print(strip.currentMilliamps);
tft.print(BusManager::currentMilliamps());
Serial.print(BusManager::currentMilliamps());
Serial.println(" mA (estimated)");
DEBUG_PRINTLN(BusManager::currentMilliamps());
DEBUG_PRINTLN(" mA (estimated)");
//tft.print("test ");
tft.print("mA (estimated)");
Serial.println("Print estimated current");
DEBUG_PRINTLN("Print estimated current");

}
Loading