until the desired reading from the internal EEPROM

Hello Everyone.Ihave followed forums.any internal EEPROM reading from my project.but I can not read data by separating the sector .For example…
123abcdef data from the serial data .I read first 3byte later 4 bytes later 2 bytes. And serial.print (data1);serial.print (data2);serial.print (data3);.how to write code this for project.
Thanks for your help.sorry for English. …

#include <SPI.h>
#include <EEPROM.h>

int addr = 0;
int add = 0;
char message;
char message1;
char message2;



void setup(void){

    Serial.begin (9600);
}
 
void loop(void)
{
   while (Serial.available()) {
     delay(10);
char some = Serial.read();
 EEPROM.write(addr, some);
  addr = addr + 1;
  if (addr == 15)
    addr = 0;
  delay(100);

//read from eeprom
char message = EEPROM.read(add);
add++;
if (add = 5)
add =0;
  Serial.print(message);//write message serial monitor.
 // How the other 10 characters can read and print 5 of 5

//for example..
//char message1 = EEPROM.read(add);
//add++;
//if (add=5);
//add=0;
//Serial.print(message1);

//char message2 = EEPROM.read(add);
//add++;
//if (add=5);
//add=0;
//Serial.print(message2);
//  I Can't read and print 5 characters of 5 characters of 5 characters 
}
}

Please post your code.

How to use this forum

Any answers?

if (add = 5)

Oops.

What AWOL said - important!

Plus read this: http://playground.arduino.cc/Code/EEPROMWriteAnything


void loop(void)
{
  while (Serial.available()) {
    delay(10);
    char some = Serial.read();
    EEPROM.write(addr, some);
    addr = addr + 1;
    if (addr == 15)
      addr = 0;

You are going to wear out your EEPROM fairly quickly at this rate. It is guaranteed for 100,000 writes. Doing a write inside loop isn't a fantastic idea.

[quote author=Nick Gammon date=1438548845 link=msg=2340969] What AWOL said - important! [/quote]

Shoudn't that be "What AWOL said == important!" :)

I've studied a lot of times.but I dont understand.How do I read the specific EEPROM address range.sample code to help write? I'm sorry but I did not understand this eeprom... :confused:

Have you fixed the problem I pointed out in reply #3? Post your code, your expectations and your results.