Skip to content

WeatherTDisplayS3.ino:322:25: error: 'TFT_BL' was not declared in this scope; did you mean 'TFT_DC'? #2

@lboue

Description

@lboue

Hi,

It seems there is an issue with TFT_BL GPIO. Could you help me?

In file included from C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino:2:
c:\Users\User\Documents\Arduino\libraries\TFT_eSPI/TFT_eSPI.h:973:8: warning: #warning >>>>------>> TOUCH_CS pin not defined, TFT_eSPI touch functions will not be available! [-Wcpp]
  973 |       #warning >>>>------>> TOUCH_CS pin not defined, TFT_eSPI touch functions will not be available!
      |        ^~~~~~~
C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino:52:19: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   52 | char* PPlbl[] = { "HUM", "PRESS", "WIND" };
      |                   ^~~~~
C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino:52:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   52 | char* PPlbl[] = { "HUM", "PRESS", "WIND" };
      |                          ^~~~~~~
C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino:52:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   52 | char* PPlbl[] = { "HUM", "PRESS", "WIND" };
      |                                   ^~~~~~
C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino: In function 'void setup()':
C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino:100:16: error: 'TFT_BL' was not declared in this scope; did you mean 'TFT_DC'?
  100 |     ledcAttach(TFT_BL, pwmFreq, pwmResolution);
      |                ^~~~~~
      |                TFT_DC
C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino: In function 'void getData()':
C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino:136:5: warning: 'template<unsigned int N> class ArduinoJson::V710PB22::StaticJsonDocument' is deprecated: use JsonDocument instead [-Wdeprecated-declarations]
  136 |     StaticJsonDocument<1024> doc;
      |     ^~~~~~~~~~~~~~~~~~
In file included from c:\Users\User\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:56,
                 from c:\Users\User\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
                 from C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino:3:
c:\Users\User\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/compatibility.hpp:63:58: note: declared here
   63 | class ARDUINOJSON_DEPRECATED("use JsonDocument instead") StaticJsonDocument
      |                                                          ^~~~~~~~~~~~~~~~~~
C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino:147:12: warning: unused variable 'dt' [-Wunused-variable]
  147 |       long dt = doc["dt"];
      |            ^~
C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino: In function 'void updateData()':
C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino:309:25: error: 'TFT_BL' was not declared in this scope; did you mean 'TFT_DC'?
  309 |               ledcWrite(TFT_BL, 0);
      |                         ^~~~~~
      |                         TFT_DC
C:\Users\User\Downloads\tDisplayS3WeatherStation-main\tDisplayS3WeatherStation-main\WeatherTDisplayS3\WeatherTDisplayS3.ino:322:25: error: 'TFT_BL' was not declared in this scope; did you mean 'TFT_DC'?
  322 |               ledcWrite(TFT_BL, backlight[curBright]);
      |                         ^~~~~~
      |                         TFT_DC
Using library WiFiManager at version 2.0.17 in folder: C:\Users\User\Documents\Arduino\libraries\WiFiManager 
Using library WiFi at version 3.0.5 in folder: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\WiFi 
Using library Networking at version 3.0.5 in folder: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\Network 
Using library Update at version 3.0.5 in folder: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\Update 
Using library WebServer at version 3.0.5 in folder: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\WebServer 
Using library FS at version 3.0.5 in folder: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\FS 
Using library DNSServer at version 3.0.5 in folder: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\DNSServer 
Using library ESP32 Async UDP at version 3.0.5 in folder: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\AsyncUDP 
Using library TFT_eSPI at version 2.5.43 in folder: C:\Users\User\Documents\Arduino\libraries\TFT_eSPI 
Using library SPI at version 3.0.5 in folder: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\SPI 
Using library SPIFFS at version 3.0.5 in folder: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\SPIFFS 
Using library ArduinoJson at version 7.1.0 in folder: C:\Users\User\Documents\Arduino\libraries\ArduinoJson 
Using library HTTPClient at version 3.0.5 in folder: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\HTTPClient 
Using library NetworkClientSecure at version 3.0.5 in folder: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.5\libraries\NetworkClientSecure 
Using library ESP32Time at version 2.0.6 in folder: C:\Users\User\Documents\Arduino\libraries\ESP32Time 
exit status 1

Compilation error: 'TFT_BL' was not declared in this scope; did you mean 'TFT_DC'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions