2.8 TFT Touch Shield V2.0 Library

Hello, I recently bought the 2.8 TFT Touch Shield V2.0 to replace my Adafruit 2.8 "TFT Touch Shield v2 screen. The screen works with an Arduino Uno board but not with an Arduino Due board.

Would it be possible to update the library? because the hardware must surely work with an Arduino Due.


You just need to set the pins.

Hello, thank you for your response.

This screen works with the ILI9341 driver, I have uncommented
#include <User_Setups / Setup1_ILI9341.h> in the User_Setup_Select.h file.

I changed a few pins but I can’t see how to add the analog pins or the SPI pins. Would that be in this file too?

`#define TFT_CS PIN_D5
#define TFT_DC PIN_D6
// # define TFT_RST PIN_D4
#define TFT_RST -1

That’s where we added it.

I can display some examples on the screen. Thank you.
Now I try to use the touch pad. So as it’s mentioned in the wiki, my screen works with analog pins. In the User_Setup fil I uncommented

#define TOUCH #define TOUCH_CS 4

//for four wire touch #define FOURWIRETOUCH #define YM A0 #define YP A2 // must be an analog pin, use "An" notation! #define XM A1 // must be an analog pin, use "An" notation! #define XP A3 // can be a digital pin,

I added #define TOUCH_CS 4 and #define YM A0 (YM was missing, no ?).

When I try to put the code on my Arduino Due I have this error:
C:\Users\CA_ELEC\Documents\Arduino\libraries\Seeed_Arduino_LCD-master\TFT_eSPI.cpp:117:43: error: no 'void TFT_eSPI::com_begin_touch()' member function declared in class 'TFT_eSPI' inline void TFT_eSPI::com_begin_touch(void) { ^ C:\Users\CA_ELEC\Documents\Arduino\libraries\Seeed_Arduino_LCD-master\TFT_eSPI.cpp:136:41: error: no 'void TFT_eSPI::com_end_touch()' member function declared in class 'TFT_eSPI' inline void TFT_eSPI::com_end_touch(void) {

My problem is I don’t understand why I got this error because TOUCH_CS and SPI_TOUCH_FREQUENCY are declared :
#if defined (TOUCH_CS) && defined (SPI_TOUCH_FREQUENCY)

It should still be the pin problem. We have tested the touch on SAMD21 and there is work fine.

Hi, it almost works. I deleted this line (which is one of mine) and the uploading on my board works:
//#define TOUCH_CS 4

I tried the example “Generic/Touch_calibrate” and the calibration seems to work but at the end it gives me :
uint16_t calData[5] = { 1, 1, 1, 1, 0 };

I didn’t find how I can fix this. Is it still a pin problem ?

Hi, i’m still looking for how to solve this.