You could also do the printing after the storage, it has some advantages.
void setup()
{
Serial.begin(19200);
Serial.print("ready to read bytes and write bytes into eeprom: ");
unsigned long start = millis();
int i = 64;
char hex[2];
while ( ( i < 512 ) && ( millis() - start ) < 120000UL) ) // timout after 2 minutes
{
if (Serial.available() > 0)
{
byte b = Serial.read();
EEPROM.write(i, b);
i++;
}
}
Serial.print("eeprom full! -> dump content");
for (int i = 64; i< 512; i++)
{
Serial.print(i. DEC);
Serial.print(" :\t");
Serial.println(EEPROM.read(i), DEC); // read back is a guarantee it is saved in the EEPROM
}
}
void loop(){}
Friend, I'm tottaly new in arduino and programming stuff.
But I reallyy need to upload a .bin file to a EEPROM.
Can you help me?
I understand you initialized the write protocol in arduino, after that you only use the GTKTerm software to uppload the binary file?