How do I write and read internal EEPROM? Can I use EEPROM.get()/EEPROM.put()?
Yes, the Arduino Reference for EEPROM contains an example of what you are asking for. Below is a simple rewrite of the example for EEPROMGet for your info.
struct MyObject{
bool status;
char password[6];
char mobileNumber[11];
};
void setup()
{
int eeAddress = 0; //EEPROM address to start reading from
Serial.begin( 9600 );
while (!Serial) ;
MyObject customVar; //Variable to store custom object read from EEPROM.
EEPROM.get(eeAddress, customVar);
Serial.println(F("Read custom object from EEPROM: "));
Serial.println(customVar.status);
Serial.println(customVar.password);
Serial.println(customVar.mobileNumber);
}
For more details and examples see https://www.arduino.cc/en/Reference/EEPROM.
Cheers!