Touchscreen not working

Hello everyone, I am relatively new to Arduino. I am using the Giga Display Shield with the Giga R1 board. it displays graphics and text fine and I was hoping to use the touchscreen for a custom project, However, when I try to use the Giga touchscreen library, it fails to initialize. I have tried using the polling example given by Arduino and it is still the same issue, but everything else works as intended. Any suggestions, or would I need to get a new display shield?

Ethan

can you give links to the exact example you are using and information about how you power your board and the error you see ?

(I don't have that board but that would help clarify your set-up)

No problem.

/*
  Touch_Polling

  created 03 May 2023
  by Leonardo Cavagnis
*/

#include "Arduino_GigaDisplayTouch.h"

Arduino_GigaDisplayTouch touchDetector;

void setup() {
  Serial.begin(115200);
  while(!Serial) {}

  if (touchDetector.begin()) {
    Serial.print("Touch controller init - OK");
  } else {
    Serial.print("Touch controller init - FAILED");
    while(1) ;
  }
}

void loop() {
  uint8_t contacts;
  GDTpoint_t points[5];
  
  contacts = touchDetector.getTouchPoints(points);

  if (contacts > 0) {
    Serial.print("Contacts: ");
    Serial.println(contacts);

    for (uint8_t i = 0; i < contacts; i++) {
      Serial.print(points[i].x);
      Serial.print(" ");
      Serial.println(points[i].y);
    }
  }

  delay(1);
}

The shield is mounted to the back of the Giga r1 and is powered by usb-c.
IMG_1083
As seen within the code, it uploads fine but displays Touch controller init - FAILED.

Regards, Ethan

have you tried ignoring the returned value ?

#include "Arduino_GigaDisplayTouch.h"

Arduino_GigaDisplayTouch touchDetector;

void setup() {
    Serial.begin(115200);
    touchDetector.begin();
}

void loop() {
    uint8_t contacts;
    GDTpoint_t points[5];
    
    contacts = touchDetector.getTouchPoints(points);
    if (contacts > 0) { //Check if at least one touch occurs on the screen
        //Print the coordinates of all simultaneous contacts detected
        for (uint8_t i = 0; i < contacts; i++) {
            Serial.print(points[i].x);
            Serial.print(" ");
            Serial.println(points[i].y);
        }
    }
}

That fixed it. Thank you very much!

Great

Probably worth reporting a bug in GitHub

Hi, can you share a closer image of the display connector from the GIGA R1 WiFi?