 
   DrawBackground();
 
-  bool m_bDetectPinsOk = DetectPins();
+  // Alert the user visually if we failed to detect the pins
+  if (!bDetectPinsOk) {
+    gslc_DrvDrawTxt(&m_gui, m_rError.x, m_rError.y, m_pFont, "*** Broken Touchscreen ***", GSLC_TXT_DEFAULT, GSLC_COL_RED, GSLC_COL_BLACK);
+  }
 }
 
 void loop()

char m_acTxt[MAX_STR];
gslc_tsRect m_rStatus = (gslc_tsRect) { 40, 60, 50, 10 };
gslc_tsRect m_rReport = (gslc_tsRect) { 40, 80, 140, 10 };
gslc_tsFont* m_pFont = NULL;

#define MAX_FONT                1

      (nPinYp != ADATOUCH_PIN_YP) || (nPinYm != ADATOUCH_PIN_YM))
    {
      GSLC_DEBUG_PRINT("MISMATCH - Please update config\n", "");
      bRet = true;
    }
    else {
      GSLC_DEBUG_PRINT("OK - No need to update config\n", "");
      bRet = true;
    }
  }
  else {
    GSLC_DEBUG_PRINT("\nERROR - Touchscreen is probably broken\n", "");
    bRet = false;
  }

  GSLC_DEBUG_PRINT("-----------------------------------------------\n\n", "");
  return bRet;
}


void setup()
{
  bool bDetectPinsOk = false;

  // Initialize debug output
  Serial.begin(9600);
  gslc_InitDebug(&DebugOut);
  //delay(1000);  // NOTE: Some devices require a delay after Serial.begin() before serial port can be used

  // Detect pins before we initialize the display driver
  DetectId();
  bDetectPinsOk = DetectPins();

  // mcufriend displays need re-init after detect
  #if defined(DRV_DISP_ADAGFX_MCUFRIEND)
    m_disp.begin(m_nMcuFriendId);
  #endif // DRV_DISP_ADAGFX_MCUFRIEND

  // Initialize (with no support for GUI elements)
  if (!gslc_Init(&m_gui, &m_drv, NULL, 0, m_asFont, MAX_FONT)) { return; }

