//---------------------------------------------DRAW DATE-----------------------------------------------------------------------------------------------------
void DrawDate() {
  tcaselect(1); //i2c multiplexer set to RTC
  
  DateTime now = rtc.now();
    if (rtc.lostPower()) {
    RTCFail = 1;
    Serial.println("RTC lost power, lets set the time!");
    // following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
    // This line sets the RTC with an explicit date & time, for example to set
    // January 21, 2014 at 3am you would call:
    // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));
  }
 
/*  Serial.print(now.year(), DEC);
  Serial.print('/');
  Serial.print(now.month(), DEC);
  Serial.print('/');
  Serial.print(now.day(), DEC);
  Serial.print(" (");
  Serial.print(daysOfTheWeek[now.dayOfTheWeek()]);
  Serial.print(") ");
  Serial.print(now.hour(), DEC);
  Serial.print(':');
  Serial.print(now.minute(), DEC);
  Serial.print(':');
  Serial.println(now.second(), DEC);
  */

  tft.setCursor(160, 16);
  tft.setTextSize(1);
  tft.setTextColor(ILI9341_YELLOW, ILI9341_BLACK);

  tft.print("Date:");
  tft.print(now.year(), DEC);tft.print('/');tft.print(now.month(), DEC);tft.print('/');tft.print(now.day(), DEC);
  tft.print(", ");
  tft.print(now.hour(), DEC);tft.print(':');tft.print(now.minute(), DEC);tft.print(':');tft.print(now.second(), DEC);tft.print(' ');


  
  //tft.setCursor(15, 40);
  //tft.setTextSize(2);
  //tft.setTextColor(ILI9341_ORANGE, ILI9341_BLACK);
  //tft.print("Tricorder V5_fw:L");


tcaselect(0); //i2c multiplexer set to GRIDEYE
}
