[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


This forum is read only and new users cannot register, please ask all new questions either using GitHub discussions, or in Arduino forum tagging @davetcc.

'iotouch' does not name a type RSS feed
Forum Index » tcMenu Arduinio library
Author Message
Lagomorphs


Joined: Aug 23, 2021
Messages: 7
Offline
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
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
What IoAbstraction version do you have installed? We usually see this when it’s the version before touch was added.
Lagomorphs


Joined: Aug 23, 2021
Messages: 7
Offline
Aloha Dave, I have 2.0.5 which I believe is the most recent version.
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
We have a couple of examples based on touch so it seems there must be an edge case with the settings.

Can you please zip up an example project and attach it here ( or use PM if you don't want to publicly post it ) so that we can try and load it into an IDE. We have a couple of ESP32 boards to hand so can readily test.

Thanks,
Dave.
Lagomorphs


Joined: Aug 23, 2021
Messages: 7
Offline
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.
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
Hi there,
I think you've made a mistake somewhere in the setup in that case, you should not need to declare the tft variable, it's done by the plugin.

Please check over the esp32Amplifier example that also uses TFT_eSPI and see how your configuration differs from that. As this example does not need to declare that variable. In fact declaring it again will create two instances and probably cause serious problems later.
Lagomorphs


Joined: Aug 23, 2021
Messages: 7
Offline
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.
Lagomorphs


Joined: Aug 23, 2021
Messages: 7
Offline
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.
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
Esp32Amplifier is working example that is within the examples, it's really intended for use with platformIO and uses a C++ for the main instead of an INO file.

https://github.com/davetcc/tcMenuLib/blob/master/examples/esp32Amplifier/esp32Amplifier_main.cpp

I've attached an example of how it should be configured below, in case you are having difficulties locating the EMF file.

In terms of the XPT2046 support, we'd like to support both that chip and FT6206 based touch screens, but we don't have either to hand at the moment.
[Thumb - tft-espi-exmple.png]
 Filename tft-espi-exmple.png [Disk] Download
 Description No description given
 Filesize 32 Kbytes
 Downloaded:  1095 time(s)

microsoftexam


Joined: Sep 3, 2021
Messages: 1
Location: Moscow
Offline
davetcc wrote:Esp32Amplifier is working example that is within the examples, it's really intended for use with platformIO and uses a C++ for the main instead of an INO file.

https://github.com/davetcc/tcMenuLib/blob/master/examples/esp32Amplifier/esp32Amplifier_main.cpp

I've attached an example of how it should be configured below, in case you are having difficulties locating the EMF file.

In terms of the XPT2046 support, we'd like to support both that chip and FT6206 based touch screens, but we don't have either to hand at the moment.


Thanks it worked for me
[WWW]
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
I wish there was a plugin for the XPT2046 touch panel tft boards.


Getting hold of capacitive touch display units is harder than I expected! I managed to finally source an adafruit breakout 2.8" TFT with i2c capacitive touch. This will let me implement for FT6206 / CST026.

Once this is implemented, I plan to try and find an XPT2046 standalone display unit - but I'm not finding much other than one with the ESP32 built in.

I'm also going to write up how to implement the override class needed to support a different touch chip. It's really easy as most of the code is shared - just needs documenting.
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
A new topic just for touch screen support.

https://www.thecoderscorner.com/jforum/posts/list/160.page
 
Forum Index » tcMenu Arduinio library
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.