Thank you CrossRoads for the very useful link. I coudn´t find the 8.4 EEPROM Data Memory topic though. I found Memory Types on page 61 instead.
Please Grumpy_Mike and Cross Roads, tell me if the following reasoning is correct. Look at this code:
#include <EEPROM.h>
void setup(){
EEPROM.write(0, 20); //
EEPROM.write(1, 21);
EEPROM.write(2, 22);
}
void loop(){
//code for line follower maze solver in here
}
Let´s supose that in the loop I put the code for a line follower maze solver. At the end of the maze an array has all the right turns in it ( as the wrong turns had been eliminated ). So lets say that the code I uploaded for the robot to solve the maze tells the Arduino that when the array with the right turns is completed the program has to go back to void setup and save those values in the EEPROM memory with EEPROM.write. Is this the right way to write in EEPROM memory while the sketch is running?
Thanks to you both.