#include <EEPROM.h>
//initialising variables
String str;
char p;
int count = 0;
int address = 0;
int add = 0;
void setup() {
Serial.begin(9600);
Serial.println("Insert the string:");
}
void loop() {
while(Serial.available()) {
str = Serial.readString();
for(int i = 0 ; i < str.length(); i++){ // reading the charactors in the string one by one
if(isdigit(str[i])){ // checking for numerical values
count++;
}
}
if (count == 9) {
for(int x = 0; x < str.length(); x++){
EEPROM.write(x, str[x]);
}
for(int k = 0; k < str.length(); k++){
p = EEPROM.read(k);
Serial.print(p);
}
}
}
}