Problem using EEPROM memory

Hello, I’m doing a program to save data entered by keyboard with eeprom memory, the problem is that when you run again no data is saved. This is the code

#include <EEPROM.h>   //Se importa librearia 
char* in="--------------------------------------------- MI AGENDA -----------------------------------";
char* in1="-------------------------------------------------------------------------------------------";
char* myStrings[]={"Nombre\t\t","Apellido\t","Telefono\t","Ciudad\t\t","Cedula\n"};   //Se daclara un arreglo

void setup()
{
 Serial.begin(9600);  //Establece la velocidad de datos en bits por segundo, para la transmision de datos en serie
 Serial.println(in);  //Serial.print se usa para imprimir en pantalla
  for (int i = 0; i <=5; i++){
   Serial.print(myStrings[i]);  
  }
 Serial.println(in1);
  }
  
String dato;

void loop()  //bucle
{ 
  while (Serial.available()) {   //mientras haya datos dentro del buffer 
    delay(10);      //tiempo de esepera
    
     if (Serial.available() > 0) { //si hay mas de 0 datos en el buffer
       
      char c = Serial.read();   //Serial.read usado para leer datos ingresados por teclado
      dato += c;     
      
      EEPROM.write(0,c);   //EEPROM.write, sirve para escribir en la memoria EEPROM los datos
      Serial.print((char)EEPROM.read(0));  //Imprime en pantalla lo que tiene en memoria
     }
  }
                
 if (dato.length() > 0) {  //Si ha ingresado texto
   
   if(dato != "a") { 
      Serial.print("\t\t");  //tabulacion
    }
    
    if (dato.length() == 11){
    Serial.print("\n");  //salto de linea
    }
  dato="";
 }
}

It looks like as you are taking in chars you are writing each one to position 0 of the EEPROM. So each char overwrites the last one. I'm betting that the string you are receiving is null terminated. So the last char is a 0. Is the 0 what you are finding at position 0 in the EEPROM?

If you want to save all of that data, then you'll have to save the first char at EEPROM position 0 and the next one at position 1 and the next at position 2 and so forth.

Please edit your post, select the code, and put it between [code][/code] tags.

You can do that by hitting the “Code” button above the posting area (It looks like a scroll with < > inside it).

How to use this forum

for (int i = 0; i <=5; i++){
   Serial.print(myStrings[i]);

Print all six of the five strings?

galo1994: If I can save the data you entered, the problem is when I close the console and then I go back open, then no data

How do you know?

The only time you read from eeprom is immediately after you've written to it on line 34 of your code.

I am SO pissed-off with cross-posters.

DO NOT CROSS POST, IT WASTES TIME.

DUPLICATE POST DELETED.