Exit status 1. error compiling to DUE

Members
On page==0 (HOME page) is two names printed next to one another on the tft screen. I have two rows of 4 names but will expand that later to more names.

In order for me to change the name on page==0 I touch the name and page==1 will pop up with a selection of names.
When I then select a name, a number is printed on the left top corner of the tft. When 'Save' is touched this number is saved to an address in the ext eeprom.

Reading back the name for display on page==0: I read the address and convert the stored number to a name.
I get an error when all of this compile but nothing is highlighted. Not sure if it might be the warning that is finally catching up with me.

Any help is appreciated.

Arduino: 1.8.5 (Windows 10), Board: "Arduino Due (Programming Port)"

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino: In function 'void HomePage()':

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:198:72: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn.initButton(&tft, 55, 15, 100, 30, CYAN, DARKGREY, BLACK, "", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:200:74: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn1.initButton(&tft, 160, 15, 100, 30, CYAN, DARKGREY, BLACK, "", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:202:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn2.initButton(&tft, 280, 15, 50, 30, CYAN, DARKGREY, BLACK, "ON", 1);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:205:73: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn3.initButton(&tft, 55, 50, 100, 30, CYAN, DARKGREY, BLACK, "", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:207:75: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn4.initButton(&tft, 160, 50, 100, 30, CYAN, DARKGREY, BLACK, "", 1);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:209:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn5.initButton(&tft, 280, 50, 50, 30, CYAN, DARKGREY, BLACK, "ON", 1);

^

In file included from C:\Users\Johan\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/Arduino.h:31:0,

from sketch\eeprom_ExtMemory.ino.cpp:1:

C:\Users\Johan\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/avr/pgmspace.h:34:23: error: expected primary-expression before ')' token

#define PSTR(str) (str)

^

C:\Users\Johan\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/WString.h:38:74: note: in expansion of macro 'PSTR'

#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:221:18: note: in expansion of macro 'F'

post = getName(F());

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino: In function 'void Data()':

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:246:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn9.initButton(&tft, 50, 80, 90, 40, CYAN, DARKGREY, BLACK, "Tina", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:248:77: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn10.initButton(&tft, 145, 80, 90, 40, CYAN, DARKGREY, BLACK, "Ted", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:250:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn11.initButton(&tft, 250, 80, 90, 40, CYAN, DARKGREY, BLACK, "James", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:252:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn12.initButton(&tft, 50, 130, 90, 40, CYAN, DARKGREY, BLACK, "Tanja", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:254:80: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn13.initButton(&tft, 145, 130, 90, 40, CYAN, DARKGREY, BLACK, "Cliff", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:256:82: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn14.initButton(&tft, 250, 130, 90, 40, CYAN, DARKGREY, BLACK, "Jeffrey", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:260:78: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn16.initButton(&tft, 280, 200, 60, 40, CYAN, DARKGREY, BLACK, "<<<", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:262:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn17.initButton(&tft, 122, 200, 90, 40, CYAN, DARKGREY, BLACK, "Save", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:264:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn18.initButton(&tft, 210, 200, 60, 40, CYAN, DARKGREY, BLACK, "Home", 2);

^

exit status 1
Error compiling for board Arduino Due (Programming Port).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

eeprom_ExtMemory.ino (8.69 KB)

The problem is this code at 221 of your sketch:

  post = getName(F());

I have no idea what you were trying to accomplish with that line, but you can't do that. getName()'s parameter is an int:

const char* getName(int i) {

So why aren't you passing it an int?

pert:
The problem is this code at 221 of your sketch:

  post = getName(F());

I have no idea what you were trying to accomplish with that line, but you can't do that. getName()'s parameter is an int:

const char* getName(int i) {

So why aren't you passing it an int?

I don't know how to do that.

Start by telling us what you intended this line to do:

post = getName(F());

pert:
Start by telling us what you intended this line to do:

post = getName(F());

'F' load the value from the eeprom. 'getName' then compares the number to a Name. 'post' tft.print the Name on the screen

The F() macro has nothing to do with EEPROM. It is used to store string literals in flash memory, like this:

Serial.println(F("Hello World"));

I notice you have a function named readEEPROM in your code. Don't you think that might be more promising for reading a value from EEPROM?

Arduino: 1.8.5 (Windows 10), Board: "Arduino Due (Programming Port)"

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino: In function 'void HomePage()':

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:198:72: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn.initButton(&tft, 55, 15, 100, 30, CYAN, DARKGREY, BLACK, "", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:200:74: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn1.initButton(&tft, 160, 15, 100, 30, CYAN, DARKGREY, BLACK, "", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:202:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn2.initButton(&tft, 280, 15, 50, 30, CYAN, DARKGREY, BLACK, "ON", 1);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:205:73: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn3.initButton(&tft, 55, 50, 100, 30, CYAN, DARKGREY, BLACK, "", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:207:75: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn4.initButton(&tft, 160, 50, 100, 30, CYAN, DARKGREY, BLACK, "", 1);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:209:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn5.initButton(&tft, 280, 50, 50, 30, CYAN, DARKGREY, BLACK, "ON", 1);

^

eeprom_ExtMemory:227: error: return-statement with a value, in function returning 'void' [-fpermissive]

case 1: return "Tina"; break;

^

eeprom_ExtMemory:228: error: return-statement with a value, in function returning 'void' [-fpermissive]

case 2: return "Ted"; break;

^

eeprom_ExtMemory:229: error: return-statement with a value, in function returning 'void' [-fpermissive]

case 3: return "James"; break;

^

eeprom_ExtMemory:230: error: return-statement with a value, in function returning 'void' [-fpermissive]

case 4: return "Tanja"; break;

^

eeprom_ExtMemory:231: error: return-statement with a value, in function returning 'void' [-fpermissive]

case 5: return "Cliff"; break;

^

eeprom_ExtMemory:232: error: return-statement with a value, in function returning 'void' [-fpermissive]

case 6: return "Jeffrey"; break;

^

eeprom_ExtMemory:233: error: return-statement with a value, in function returning 'void' [-fpermissive]

case 7: return "Casey"; break;

^

eeprom_ExtMemory:234: error: return-statement with a value, in function returning 'void' [-fpermissive]

case 8: return "Marge"; break;

^

eeprom_ExtMemory:235: error: return-statement with a value, in function returning 'void' [-fpermissive]

default: return "choose"; break;

^

eeprom_ExtMemory:237: error: 'setCursor' was not declared in this scope

setCursor(8, 8);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino: In function 'void Data()':

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:263:76: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn9.initButton(&tft, 50, 80, 90, 40, CYAN, DARKGREY, BLACK, "Tina", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:265:77: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn10.initButton(&tft, 145, 80, 90, 40, CYAN, DARKGREY, BLACK, "Ted", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:267:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn11.initButton(&tft, 250, 80, 90, 40, CYAN, DARKGREY, BLACK, "James", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:269:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn12.initButton(&tft, 50, 130, 90, 40, CYAN, DARKGREY, BLACK, "Tanja", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:271:80: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn13.initButton(&tft, 145, 130, 90, 40, CYAN, DARKGREY, BLACK, "Cliff", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:273:82: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn14.initButton(&tft, 250, 130, 90, 40, CYAN, DARKGREY, BLACK, "Jeffrey", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:277:78: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn16.initButton(&tft, 280, 200, 60, 40, CYAN, DARKGREY, BLACK, "<<<", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:279:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn17.initButton(&tft, 122, 200, 90, 40, CYAN, DARKGREY, BLACK, "Save", 2);

^

C:\Users\Johan\Documents\Arduino\eeprom_ExtMemory\eeprom_ExtMemory.ino:281:79: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

on_btn18.initButton(&tft, 210, 200, 60, 40, CYAN, DARKGREY, BLACK, "Home", 2);

^

exit status 1
return-statement with a value, in function returning 'void' [-fpermissive]

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

This line default: return "choose"; break; is highlighted. I can't seem to figure this out.

Any help would be appreciated.
Thanks

eeprom_ExtMemory.ino (8.73 KB)

error: return-statement with a value, in function returning 'void' You promised the compiler you wouldn't return a value

AWOL:
error: return-statement with a value, in function returning 'void' You promised the compiler you wouldn't return a value

That is one 'promise' I can't keep. Is it because 'switch' it is in the 'void HomePage()'?

fnb111:
That is one 'promise' I can't keep. Is it because 'switch' it is in the 'void HomePage()'?

This link has a possibility of being helpful: http://www.cplusplus.com/doc/tutorial/functions/

fnb111:
That is one 'promise' I can't keep.

Pretend you're a politician, and move the goalposts.

Is it because 'switch' it is in the 'void HomePage()'?

I can't see your code.

AWOL:
Pretend you're a politician, and move the goalposts.I can't see your code.

void loop() {
  update_button_list(active_buttons);
  check_buttons();
}

//============== Check menu buttons ===============
void check_buttons() {
  if (currentPage == '0') {         //============= Home page
    //load address for eeprom & wait for name input
    if (on_btn.justPressed()) {
      address = 1;
      Data();
    }
    else if (on_btn1.justPressed()) {
      address = 10;
      Data();
    }
    else if (on_btn2.justPressed())Game();

    else if (on_btn3.justPressed()) {
      address = 20;
      Data();
    }
    else if (on_btn4.justPressed()) {
      address = 30;
      Data();
    }
    else if (on_btn5.justPressed()) Game();
  }
  else if (currentPage == '1')  {   //============= Data page
    if (on_btn9.justPressed()) {
      if (Number == 0)Number = 1;
      Data();
    }
    else if (on_btn10.justPressed()) {
      if (Number == 0)Number = 2;
      Data();
    }
    else if (on_btn11.justPressed()) {
      if (Number == 0)Number = 3;
      Data();
    }
    if (on_btn12.justPressed()) {
      if (Number == 0)Number = 4;
      Data();
    }
    else if (on_btn13.justPressed()) {
      if (Number == 0)Number = 5;
      Data();
    }
    else if (on_btn14.justPressed()) {
      if (Number == 0)Number = 6;
      Data();
    }
    //...........................................
    else if (on_btn16.justPressed()) {
      Number = 0;  //delete button
      result = false;
      Data();
    }
    else if (on_btn17.justPressed()) {
      result = true;
      writeEEPROM (disk1, address, Number); //save button
      if (Number == 0)Number = 0;//reset number
      HomePage();
    }
    else if (on_btn18.justPressed()) HomePage();
  }//END else if (currentPage=='1'
} //END check_buttons()

// ==================== end Menu =================

void HomePage() { //page==0
  currentPage = '0';
  active_buttons = page0_buttons;
  tft.fillScreen(BLACK);
  /*Gost buttons used to select the name change on page==0
    and Game button*/
  //row 1
  on_btn.initButton(&tft, 55, 15, 100, 30, CYAN, DARKGREY, BLACK, "", 2);
  on_btn.drawButton(false);
  on_btn1.initButton(&tft, 160, 15, 100, 30, CYAN, DARKGREY, BLACK, "", 2);
  on_btn1.drawButton(false);
  on_btn2.initButton(&tft,  280, 15, 50, 30, CYAN, DARKGREY, BLACK, "ON", 1);
  on_btn2.drawButton(false);
  //row 2
  on_btn3.initButton(&tft, 55, 50, 100, 30, CYAN, DARKGREY, BLACK, "", 2);
  on_btn3.drawButton(false);
  on_btn4.initButton(&tft,  160, 50, 100, 30, CYAN, DARKGREY, BLACK, "", 1);
  on_btn4.drawButton(false);
  on_btn5.initButton(&tft,  280, 50, 50, 30, CYAN, DARKGREY, BLACK, "ON", 1);
  on_btn5.drawButton(false);
  //row 3

  /*..........................................*/
  tft.setTextSize(2);
  tft.setTextColor(WHITE);

  byte J = (readEEPROM(disk1, 1));
  byte K = (readEEPROM(disk1, 10));
  byte L = (readEEPROM(disk1, 20));
  byte M = (readEEPROM(disk1, 30));
  /*............................................*/
  tft.setCursor(8, 8);
  post = getName(J());
  tft.print(post);

  tft.setCursor(115, 8);
  tft.print(G);
  /*............................................*/
  Serial.println(readEEPROM(disk1, 1), DEC);//J
  Serial.println(readEEPROM(disk1, 10), DEC);//K
  Serial.println(readEEPROM(disk1, 20), DEC);//L
  Serial.println(readEEPROM(disk1, 30), DEC);//M
}

void Data() {  //page==1

  currentPage = '1';
  active_buttons = page1_buttons;
  //Serial.println("Data");
  tft.fillScreen(BLACK);
  tft.fillRect(5, 5, 25, 25, BLACK); //clear prev number from screen
  //tft.setTextSize(2);
  //tft.setTextColor(WHITE);
  //tft.setCursor(8, 8);
  //tft.print(Number);
  //tft.print(" ");
  /*Names and gost buttons*/
  on_btn9.initButton(&tft, 50, 80, 90, 40, CYAN, DARKGREY, BLACK, "Tina", 2);
  on_btn9.drawButton(false);
  on_btn10.initButton(&tft, 145, 80, 90, 40, CYAN, DARKGREY, BLACK, "Ted", 2);
  on_btn10.drawButton(false);
  on_btn11.initButton(&tft, 250, 80, 90, 40, CYAN, DARKGREY, BLACK, "James", 2);
  on_btn11.drawButton(false);
  on_btn12.initButton(&tft, 50, 130, 90, 40, CYAN, DARKGREY, BLACK, "Tanja", 2);
  on_btn12.drawButton(false);
  on_btn13.initButton(&tft, 145, 130, 90, 40, CYAN, DARKGREY, BLACK, "Cliff", 2);
  on_btn13.drawButton(false);
  on_btn14.initButton(&tft, 250, 130, 90, 40, CYAN, DARKGREY, BLACK, "Jeffrey", 2);
  on_btn14.drawButton(false);

  //bottom row buttons
  on_btn16.initButton(&tft, 280, 200, 60, 40, CYAN, DARKGREY, BLACK, "<<<", 2);
  on_btn16.drawButton(false);
  on_btn17.initButton(&tft, 122, 200, 90, 40, CYAN, DARKGREY, BLACK, "Save", 2);
  on_btn17.drawButton(false);
  on_btn18.initButton(&tft, 210, 200, 60, 40, CYAN, DARKGREY, BLACK, "Home", 2);
  on_btn18.drawButton(false);
}// end Data()


void Game() {
}

void writeEEPROM(int deviceaddress, unsigned int eeaddress, byte Number) {
  Wire1.beginTransmission(deviceaddress);
  Wire1.write((int)(eeaddress >> 8));   // MSB
  Wire1.write((int)(eeaddress & 0xFF)); // LSB
  Wire1.write(Number);
  Wire1.endTransmission();
  delay(5);
  Number = 0;
  address = 0;
}

byte readEEPROM(int deviceaddress, unsigned int eeaddress ) {
  byte rdata = 0xFF;
  Wire1.beginTransmission(deviceaddress);
  Wire1.write((int)(eeaddress >> 8));   // MSB
  Wire1.write((int)(eeaddress & 0xFF)); // LSB
  Wire1.endTransmission();
  Wire1.requestFrom(deviceaddress, 1);
  if (Wire1.available()) rdata = Wire1.read();
  return rdata;
}

const char* getName(int i) {
  switch (i) {
    case 1: return "Tina"; break;
    case 2: return "Ted"; break;
    case 3: return "James"; break;
    case 4: return "Tanja"; break;
    case 5: return "Cliff"; break;
    case 6: return "Jeffrey"; break;
    case 7: return "Casey"; break;
    case 8: return "Marge"; break;
    default: return "choose"; break;
  }
}

pert:
The problem is this code at 221 of your sketch:

  post = getName(F());

I have no idea what you were trying to accomplish with that line, but you can't do that. getName()'s parameter is an int:

const char* getName(int i) {

So why aren't you passing it an int?

Why cant I use

  byte J = (readEEPROM(disk1, 1));
  byte K = (readEEPROM(disk1, 10));
  byte L = (readEEPROM(disk1, 20));
  byte M = (readEEPROM(disk1, 30));
  /*............................................*/
  tft.setCursor(8, 8);
  post = getName(J());
  tft.print(post);

byte J? Ive tried to change it (int J) to an int but I still get a compile error.

I see now. you have a variable in your sketch named F. There is an F() macro in the Arduino core library that is used to store string literals in flash memory:

This is not how you pass a variable to a function:

fnb111:

  post = getName(J());

This is how you pass a variable to a function:

  post = getName(J);

Solved. Thanks for all the help. I appreciate it a lot.

/*..........................................*/
  int J = (readEEPROM(disk1, 1));
  int K = (readEEPROM(disk1, 10));
  int L = (readEEPROM(disk1, 20));
  int M = (readEEPROM(disk1, 30));
  /*............................................*/
  tft.setTextSize(2);
  tft.setTextColor(WHITE);
  tft.setCursor(8, 8);
  post = getName(J);//declared as global var const char* post;
  tft.print(post);
  
  tft.setCursor(115, 8);
  post = getName(K);
  tft.print(post);

  tft.setCursor(8, 40);
  post = getName(L);
  tft.print(post);
  
  tft.setCursor(115, 40);
  post = getName(M);
  tft.print(post);  
  /*............................................*/
  }

void Data() {  //page==1

  currentPage = '1';
  active_buttons = page1_buttons;
  //Serial.println("Data");
  tft.fillScreen(BLACK);
  tft.fillRect(5, 5, 25, 25, BLACK); //clear prev number from screen
  tft.setTextSize(2);
  tft.setTextColor(WHITE);
  tft.setCursor(8, 8);
  tft.print(Number);
  tft.print(" ");
  /*Names and gost buttons*/
  on_btn9.initButton(&tft, 50, 80, 90, 40, CYAN, DARKGREY, BLACK, "Tina", 2);
  on_btn9.drawButton(false);
  on_btn10.initButton(&tft, 145, 80, 90, 40, CYAN, DARKGREY, BLACK, "Ted", 2);
  on_btn10.drawButton(false);
  on_btn11.initButton(&tft, 250, 80, 90, 40, CYAN, DARKGREY, BLACK, "James", 2);
  on_btn11.drawButton(false);
  on_btn12.initButton(&tft, 50, 130, 90, 40, CYAN, DARKGREY, BLACK, "Tanja", 2);
  on_btn12.drawButton(false);
  on_btn13.initButton(&tft, 145, 130, 90, 40, CYAN, DARKGREY, BLACK, "Cliff", 2);
  on_btn13.drawButton(false);
  on_btn14.initButton(&tft, 250, 130, 90, 40, CYAN, DARKGREY, BLACK, "Jeffrey", 2);
  on_btn14.drawButton(false);

  //bottom row buttons
  on_btn16.initButton(&tft, 280, 200, 60, 40, CYAN, DARKGREY, BLACK, "<<<", 2);
  on_btn16.drawButton(false);
  on_btn17.initButton(&tft, 122, 200, 90, 40, CYAN, DARKGREY, BLACK, "Save", 2);
  on_btn17.drawButton(false);
  on_btn18.initButton(&tft, 210, 200, 60, 40, CYAN, DARKGREY, BLACK, "Home", 2);
  on_btn18.drawButton(false);
}// end Data()


void Game() {
}

void writeEEPROM(int deviceaddress, unsigned int eeaddress, byte Number) {
  Wire1.beginTransmission(deviceaddress);
  Wire1.write((int)(eeaddress >> 8));   // MSB
  Wire1.write((int)(eeaddress & 0xFF)); // LSB
  Wire1.write(Number);
  Wire1.endTransmission();
  delay(5);
  Number = 0;
  address = 0;
}

byte readEEPROM(int deviceaddress, unsigned int eeaddress ) {
  byte rdata = 0xFF;
  Wire1.beginTransmission(deviceaddress);
  Wire1.write((int)(eeaddress >> 8));   // MSB
  Wire1.write((int)(eeaddress & 0xFF)); // LSB
  Wire1.endTransmission();
  Wire1.requestFrom(deviceaddress, 1);
  if (Wire1.available()) rdata = Wire1.read();
  return rdata;
}

const char* getName(int i) {
  switch (i) {
    case 1: return "Tina"; break;
    case 2: return "Ted"; break;
    case 3: return "James"; break;
    case 4: return "Tanja"; break;
    case 5: return "Cliff"; break;
    case 6: return "Jeffrey"; break;
    case 7: return "Casey"; break;
    case 8: return "Marge"; break;
    default: return "choose"; break;
  }
}

The complete code is attached. Might be helping someone down the line.

eeprom_ExtMemory.ino (8.72 KB)