Hello group,
Since I'm unable to use the CANDIDO ILI9488 library, I'm trying to use the TFT_eSPI library. With this library, I was able to turn on the TFT and display objects and text.
Now I'm trying to use the touch component and I need the getTouch function, which is in the Extensions\Touch.h library.
I'm trying to load the library like this:
I call the function like this:
This error is generated, which cannot be resolved.
How can I solve this problem?
I'm attaching the program I'm using; it's just for testing and to get started with the library.
Thank you very much
Since I'm unable to use the CANDIDO ILI9488 library, I'm trying to use the TFT_eSPI library. With this library, I was able to turn on the TFT and display objects and text.
Now I'm trying to use the touch component and I need the getTouch function, which is in the Extensions\Touch.h library.
I'm trying to load the library like this:
#include <TFT_eSPI.h>
#include <Extensions\Touch.h>
I call the function like this:
// Read if the screen has been touched and where
void ReadTouch (B4R::Object* o) {
getTouch(b4r_tft::_tft_px,b4r_tft::_tft_py,b4r_tft::_tft_touch_sense);
}
This error is generated, which cannot be resolved.
Does anyone use or have they used this library?n file included from D:\TRASH\B4R\TFT_B4R\Objects\src\b4r_tft.cpp:59:
C:\Users\gtvpi\OneDrive\Documents\Arduino\libraries\TFT_eSPI/Extensions\Touch.h:4:2: error: expected unqualified-id before 'public'
4 | public:
| ^~~~~~
C:\Users\gtvpi\OneDrive\Documents\Arduino\libraries\TFT_eSPI/Extensions\Touch.h:25:2: error: expected unqualified-id before 'private'
25 | private:
| ^~~~~~~
D:\TRASH\B4R\TFT_B4R\Objects\src\b4r_tft.cpp: In function 'void ReadTouch(B4R::Object*)':
D:\TRASH\B4R\TFT_B4R\Objects\src\b4r_tft.cpp:171:27: error: invalid conversion from 'UInt' {aka 'short unsigned int'} to 'uint16_t*' {aka 'short unsigned int*'} [-fpermissive]
171 | getTouch(b4r_tft::_tft_px,b4r_tft::_tft_py,b4r_tft::_tft_touch_sense);
| ~~~~~~~~~^~~~~~~
| |
| UInt {aka short unsigned int}
C:\Users\gtvpi\OneDrive\Documents\Arduino\libraries\TFT_eSPI/Extensions\Touch.h:18:31: note: initializing argument 1 of 'uint8_t getTouch(uint16_t*, uint16_t*, uint16_t)'
18 | uint8_t getTouch(uint16_t *x, uint16_t *y, uint16_t threshold = 600);
| ~~~~~~~~~~^
D:\TRASH\B4R\TFT_B4R\Objects\src\b4r_tft.cpp:171:44: error: invalid conversion from 'UInt' {aka 'short unsigned int'} to 'uint16_t*' {aka 'short unsigned int*'} [-fpermissive]
171 | getTouch(b4r_tft::_tft_px,b4r_tft::_tft_py,b4r_tft::_tft_touch_sense);
| ~~~~~~~~~^~~~~~~
| |
| UInt {aka short unsigned int}
C:\Users\gtvpi\OneDrive\Documents\Arduino\libraries\TFT_eSPI/Extensions\Touch.h:18:44: note: initializing argument 2 of 'uint8_t getTouch(uint16_t*, uint16_t*, uint16_t)'
18 | uint8_t getTouch(uint16_t *x, uint16_t *y, uint16_t threshold = 600);
| ~~~~~~~~~~^
Error during build: exit status 1
How can I solve this problem?
I'm attaching the program I'm using; it's just for testing and to get started with the library.
Thank you very much