WT32-SC01 using TFT_eSPI Issue with Reprinting Screen and White Screen Error #2344
-
I am having the issue where after the enterSecurityCode() function has been completed (ie. the security code is correct) the screen will not reprint for the new enterPhoneNumber() function. The screen flashes to white and does not change once the correct security code is entered, but the loop continues to the enterPhoneNumber() function. When entering a correct phone, the screen will just stay white and the loop will begin again. Where am I going wrong here and how can I ensure the screen clears and reprints for each new function? Another question I had is how am I able to print the numbers on the screen as they are entered from the keypad? Thanks for all your assistance! Here is the sample .INO code 😄
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
I expect the watchdog is timing out. Add a line: within each of the while loops. Also you need to send the digits to the screen during the whilke loop. You can use tft.print for this. |
Beta Was this translation helpful? Give feedback.
-
There is something wrong with the setup. I suggest you carefully follow the tutorial here and get the board working correctly with that code before trying to develop new code: |
Beta Was this translation helpful? Give feedback.
-
The TFT screen and touch controller are wired to certain GPIO pins by the circuit board so these must NOT be changed: The TFT pins cannot be used for any other function. You can delete this line:
|
Beta Was this translation helpful? Give feedback.
The TFT screen and touch controller are wired to certain GPIO pins by the circuit board so these must NOT be changed:
#define PIN_SDA 18
#define PIN_SCL 19
#define TFT_MISO 12
#define TFT_MOSI 13
#define TFT_SCLK 14
#define TFT_CS 15
#define TFT_DC 21
#define TFT_RST 22
#define TFT_BL 23
The TFT pins cannot be used for any other function.
You can delete this line:
#define TOUCH_CS PIN_D2 // Chip select pin (T_CS) of touch screen
which is not correctly defining an ESP32 GPIO pin anyway! (PIN_D2 is a pin definition for the ESP8266 only, it would map to GPIO 4 on an ESP32).