Message |
|
You can gets lots of cheap SPI TFT touch screens on ebay for peanuts, they all use the XPT2046. I've bought lots of them and they all work fine.
|
|
|
Hi Dave, I finally found ESP32Amplifier. The library version doesn't have an .ino suffix and doesn't show up in the examples, so I rebuilt it with tcMenu using a rotary encoder, since my tft boards don't have analog outputs, it compiles and works fine. I wish there was a plugin for the XPT2046 touch panel tft boards.
|
|
|
HI, tcMenu is almost exactly what I need but there is no INPUT plugin for TFT boards using the XPT2046. None of the TFT boards I have have analog outputs. Is there a tcMENU beta plugin or example of how to do touch screen with the XPT2046 for ESP32 TTF_eSPI? Thanks.
|
|
|
Arduino: 1.8.15 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
C:\Users\Lagomorphs\Documents\Arduino\New folder\new\new_menu.cpp: In function 'void setupMenu()':
new_menu.cpp:30:5: error: 'tft' was not declared in this scope
tft.begin();
^
exit status 1
'tft' was not declared in this scope
C:\Users\Lagomorphs\Documents\Arduino\New folder\new\new_menu.cpp: In function 'void setupMenu()':
new_menu.cpp:30:5: error: 'tft' was not declared in this scope
tft.begin();
^
exit status 1
'tft' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I can't find esp32Amplifier anywhere???
I'm including the .emf file and the code it generated which give the above error, plus the User_setup.h file I used. Thanks.
|
|
|
Aloha Dave, thanks for your prompt replies. As I was recreating the problem, I noticed I had selected the wrong display the AdafruitGFX quick start. When I tried the TFT_eSPI it works fine except for a 'tft' was not declared in this scope error in _menu.cpp
The generated code looks like:
// Set up code
void setupMenu() {
tft.begin();
but if I change it to:
// Set up code
TFT_eSPI tft = TFT_eSPI(); // added this line
void setupMenu() {
tft.begin();
it compiles and works just fine. I don't know if this is a bug or I am doing something wrong. But it may help someone else with the same problem. Mahalos (thanks) for your help.
|
|
|
Aloha Dave, I have 2.0.5 which I believe is the most recent version.
|
|
|
Aloha all,
I hope someone can help me. I am trying to compile the colorTfthernet32 example with two changes. The changes are that I selected the "Resistive touch screen on analog inputs" and display type ILI9341. I have the most recent versions of everything. When I compile, I get the following error. Thanks, Tom.
Arduino: 1.8.15 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
In file included from C:\Users\Lagomorphs\Documents\Arduino\test\test_menu.cpp:12:0:
test_menu.h:28:8: error: 'iotouch' does not name a type
extern iotouch::ResistiveTouchInterrogator touchInterrogator;
^
test_menu.h:29:8: error: 'MenuTouchScreenManager' does not name a type
extern MenuTouchScreenManager touchScreen;
^
test_menu.cpp:21:1: error: 'iotouch' does not name a type
iotouch::ResistiveTouchInterrogator touchInterrogator(21, A0, 22, A1);
^
test_menu.cpp:22:1: error: 'MenuTouchScreenManager' does not name a type
MenuTouchScreenManager touchScreen(&touchInterrogator, &renderer, iotouch::TouchInterrogator::PORTRAIT);
^
C:\Users\Lagomorphs\Documents\Arduino\test\test_menu.cpp: In function 'void setupMenu()':
test_menu.cpp:89:5: error: 'touchScreen' was not declared in this scope
touchScreen.start();
^
In file included from C:\Users\Lagomorphs\Documents\Arduino\test\test.ino:1:0:
test_menu.h:28:8: error: 'iotouch' does not name a type
extern iotouch::ResistiveTouchInterrogator touchInterrogator;
^
test_menu.h:29:8: error: 'MenuTouchScreenManager' does not name a type
extern MenuTouchScreenManager touchScreen;
^
exit status 1
'iotouch' does not name a type
|
|
|