void setDefaults(){
  
  if(once1 == 0){
    i=0;
   once1 = 1;
  goto here;//run menu once to print to display
}

  if (digitalRead(setbup) == 0){
here://used to initialize the menu when settings first called
delay(250);
i = i+1;
if (i>5){i=1;}
  TCA9548A(2);
  mainDisplay.setTextColor(WHITE);  
  mainDisplay.setTextSize(2);
  mainDisplay.clearDisplay();
  mainDisplay.setCursor(41,8);
  mainDisplay.print("SET");
  mainDisplay.setCursor(18,25);
  mainDisplay.print("DEFAULT");
  mainDisplay.setCursor(55,45);
  mainDisplay.print(i);
  mainDisplay.display();
  }
 if (digitalRead(setbdown) == 0){
delay(250);
i = i-1;
if (i<1){i=5;}
  TCA9548A(2);
  mainDisplay.setTextColor(WHITE);  
  mainDisplay.setTextSize(2);
  mainDisplay.clearDisplay();
  mainDisplay.setCursor(41,8);
  mainDisplay.print("SET");
  mainDisplay.setCursor(18,25);
  mainDisplay.print("DEFAULT");
  mainDisplay.setCursor(55,45);
  mainDisplay.print(i);
  mainDisplay.display();
  }
if (digitalRead(setbright) == 0){// set array x as main array
delay(250);
switch (i){
case 1:
  memcpy(factoryDefaults[0], preset1, sizeof(preset1));
  memcpy(factoryDefaults[1], preset2, sizeof(preset2));
  memcpy(factoryDefaults[2], preset3, sizeof(preset3));
  memcpy(factoryDefaults[3], preset4, sizeof(preset4));
  memcpy(factoryDefaults[4], preset5, sizeof(preset5)); 

  memcpy(settings, factoryDefaults, sizeof(settings));
break;
case 2:
  memcpy(factoryDefaults[0], preset1b, sizeof(preset1));
  memcpy(factoryDefaults[1], preset2b, sizeof(preset2));
  memcpy(factoryDefaults[2], preset3b, sizeof(preset3));
  memcpy(factoryDefaults[3], preset4b, sizeof(preset4));
  memcpy(factoryDefaults[4], preset5b, sizeof(preset5));

  memcpy(settings, factoryDefaults, sizeof(settings));
break;
case 3:
  memcpy(factoryDefaults[0], preset1b, sizeof(preset1));
  memcpy(factoryDefaults[1], preset2b, sizeof(preset2));
  memcpy(factoryDefaults[2], preset3b, sizeof(preset3));
  memcpy(factoryDefaults[3], preset4b, sizeof(preset4));
  memcpy(factoryDefaults[4], preset5b, sizeof(preset5));

  memcpy(settings, factoryDefaults, sizeof(settings));
break;
case 4:
  memcpy(factoryDefaults[0], preset1b, sizeof(preset1));
  memcpy(factoryDefaults[1], preset2b, sizeof(preset2));
  memcpy(factoryDefaults[2], preset3b, sizeof(preset3));
  memcpy(factoryDefaults[3], preset4b, sizeof(preset4));
  memcpy(factoryDefaults[4], preset5b, sizeof(preset5));

  memcpy(settings, factoryDefaults, sizeof(settings));
break;
case 5:
  memcpy(factoryDefaults[0], preset1b, sizeof(preset1));
  memcpy(factoryDefaults[1], preset2b, sizeof(preset2));
  memcpy(factoryDefaults[2], preset3b, sizeof(preset3));
  memcpy(factoryDefaults[3], preset4b, sizeof(preset4));
  memcpy(factoryDefaults[4], preset5b, sizeof(preset5));

  memcpy(settings, factoryDefaults, sizeof(settings));
break;
}//end switch
  mainDisplay.setTextColor(WHITE);  
  mainDisplay.setTextSize(2);
  mainDisplay.clearDisplay();
  mainDisplay.setCursor(20,10);
  mainDisplay.print("DEFAULT");
  mainDisplay.setCursor(52,29);
  mainDisplay.print(i);
  mainDisplay.setCursor(39,47);
  mainDisplay.print("SET");  
  mainDisplay.display();
  delay(1000);
  mainDisplay.clearDisplay();
  mainDisplay.setTextSize(1.5);
  mainDisplay.setCursor(15,2);
  mainDisplay.print("DESIGNERTRONICS");
  if(blueTooth==1){
  mainDisplay.setTextSize(2);
  mainDisplay.setCursor(95,15);
  mainDisplay.print("BT");
}
     mainDisplay.display();
  once1 = 0;    
  return;
  return;
}//end if (digitalRead(setbright)

if (digitalRead(setbleft) == 0){//
  TCA9548A(2);
  mainDisplay.clearDisplay();
  mainDisplay.setTextSize(2);
  mainDisplay.setTextColor(WHITE);
  mainDisplay.setCursor(15,30);
  mainDisplay.print("Exiting");
  mainDisplay.display();
       delay(500);
  mainDisplay.clearDisplay();
  mainDisplay.setTextSize(1.5);
  mainDisplay.setTextColor(WHITE);
  mainDisplay.setCursor(15,2);
   mainDisplay.print("DESIGNERTRONICS");
  if(blueTooth==1){
  mainDisplay.setTextSize(2);
  mainDisplay.setCursor(95,15);
  mainDisplay.print("BT");
  }
     mainDisplay.display();
   once1 = 0;     
    return;
    return;
  }
 if(once1 == 1){
   setDefaults();
}
return;
return;
}




