Display powers but nothing shows after reset

Hello all, I'm new here and I'm in desperate need of some help with my project.

I've been using the example code given to me from the Arduino IDE to test it out. Some were successful, others were not (for example, the touch_switch).

However, the main problem begins after the display turns off, i.e. the USBC disconnects, the display is completely empty. Touch still works, but the display shows nothing but darkness.

Double-pressing the reset button, removing and reinserting the USBC drive shows variable success. I can't have something so unreliable as this project of mine is extremely important for my graduation.

I would love to have any sort of help from anyone who is able to assist.

Thank you very much for reading this post,
~Dragonwolf625

There is something you are not telling us about what you are doing. Are you powering your setup from TWO different sources?

What I'm doing is just a basic menu display that drives stepper motors. For now I'm only focusing on the GUI implementation. I'm using example code to get an idea of how the Display Shield operates. No other external connections are used beside the power source.

I'm also using the Arduino R1 WiFi as its base.

No, I am using a singular source, just the USBC cable. I've tried different ones, same results.

I'm sorry for not being clear the first time; I'm happy to clarify further :slightly_smiling_face:

EDIT: Whoops, forgot to add the example code that I'm using for this project:

/*
  This example uses the Arduino_GigaDisplayTouch and
  Arduino_GigaDisplay_GFX library to change the
  display whenever it is touched, inverting the colors.

  The circuit:
  - GIGA R1 WiFi
  - GIGA Display Shield

  created 10 sept 2023
  by Karl Söderby

  This example code is in the public domain.
*/

#include "Arduino_GigaDisplay_GFX.h"
#include "Arduino_GigaDisplayTouch.h"

Arduino_GigaDisplayTouch touchDetector;
GigaDisplay_GFX display;

#define WHITE 0xffff
#define BLACK 0x0000

#define screen_size_x 480
#define screen_size_y 800

int touch_x;
int touch_y;

int lastTouch;
int threshold = 250;

bool switch_1;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  display.begin();

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

void loop() {
  uint8_t contacts;
  GDTpoint_t points[5];
  contacts = touchDetector.getTouchPoints(points);
  
  if (contacts > 0 && (millis() - lastTouch > threshold)) {
    Serial.print("Contacts: ");
    Serial.println(contacts);

    //record the x,y coordinates 
    for (uint8_t i = 0; i < contacts; i++) {
      touch_x = points[i].x;
      touch_y = points[i].y;
    }

    //as the display is 480x800, anywhere you touch the screen it will trigger
    if (touch_x < screen_size_x && touch_y < screen_size_y) {
      switch_1 = !switch_1;
      Serial.println("switched");
      changeSwitch();
    }
    lastTouch = millis();
  }
}

void changeSwitch() {
  if (switch_1) {
    display.fillScreen(BLACK);
    display.setTextColor(WHITE);
  } else {
    display.fillScreen(WHITE);
    display.setTextColor(BLACK);
  }
  display.setCursor(50, screen_size_y/2);
  display.setTextSize(5);
  display.print("Switched");
}

Sorry about that!

Without another power source the sketch is not running.

Yes, that is true. But even with the USBC connected to it, the screen would flash a few artifacts and then go dark again. I'm hoping I didn't break it...

I've done the double-tap reset button but I dunno about the Boot0 button; I haven't had much luck with that either.

Or I'm missing something; there's that too. :sweat_smile:

You are missing a lot of needed information. Post an annotated schematic showing exactly what you have and how it is wired. Show ALL connections, power, ground, power sources and any other hardware involved. Be sure to note which Arduino you are using. Post links to each of the hardware devices that gives technical information.

As for schematics, I don't really have a design besides the Giga Display Shield and the R1 WiFi. No wires, no connections. And the USBC power cable is connected to my workstation with the latest Arduino IDE installed.

I'm unsure if this is what you were asking: I'm a student and still rather new to the field. I apologize for the inconvenience.

I am using the Arduino R1 WiFi to power the Giga Display Shield. I've mentioned it earlier (or at least I think I did).

As in, datasheets for the arduino and display itself? I'm not quite sure I'm understanding.

This link points to a display shield and has a link for the schematics, is this the one? Many times there are various versions of shields. Are there batteries involved? Is there an external power supply? Post a picture of your setup if you can, I am not familiar with these items.