The problem is with sizeof(com)
in your loops. sizeof()
is for C arrays, not string objects. If you print it, it will report 6, which is not the length of the array. For string objects you should use com.length()
instead. Then the output becomes
Saved
Testing~Network123......
P.S. The EEPROM can store 1024 bytes on ATmega328P-based boards (I believe that's what most Arduino Nanos use (clones included).
The problem is with sizeof(com)
in your loops. sizeof()
is for C arrays, not string objects. If you print it, it will report 6, which is not the length of the array. For string objects you should use com.length()
instead. Then the output becomes
Saved
Testing~Network123......
P.S. The EEPROM can store 1024 bytes on ATmega328P-based boards (I believe that's what most Arduino Nanos use (clones included).
The problem is with sizeof(com)
in your loops. sizeof()
is for C arrays, not string objects. If you print it, it will report 6, which is not the length of the array. For string objects you should use com.length()
instead. Then the output becomes
Saved
Testing~Network123......
P.S. The EEPROM can store 1024 bytes on ATmega328P-based boards (I believe that's what most Arduino Nanos use (clones included).
The problem is with sizeof(com)
in your loops. sizeof()
is for C arrays, not string objects. If you print it, it will report 6, which is not the length of the array. For string objects you should use com.length()
instead. Then the output becomes
Saved
Testing~Network123......
P.S. The EEPROM can store 1024 bytes on ATmega328P-based boards (I believe that's what most Arduino Nanos use (clones included).
The problem is with sizeof(com)
in your loops. sizeof()
is for C arrays, not string objects. If you print it, it will report 6, which is not the length of the array. For string objects you should use com.length()
instead. Then the output becomes
Saved
Testing~Network123......
The problem is with sizeof(com)
in your loops. sizeof()
is for C arrays, not string objects. If you print it, it will report 6, which is not the length of the array. For string objects you should use com.length()
instead. Then the output becomes
Saved
Testing~Network123......
P.S. The EEPROM can store 1024 bytes on ATmega328P-based boards (I believe that's what most Arduino Nanos use (clones included).
The problem is with sizeof(com)
in your loops. sizeof()
is for C arrays, not string objects. If you print it, it will report 6, which is not the length of the array. For string objects you should use com.length()
instead. Then the output becomes
Saved
Testing~Network123......