Here's a small example.. this will get a value from the monitor and store in the EEPROM. If nothing is entered (or 0) then it will get the previous value from the EEPROM.
#include <EEPROM.h>
uint16_t value = 0;
void setup()
{
Serial.begin(115200);
Serial.println("Enter value: ");
while (Serial.available() == 0); // Wait til we get some input.
value = Serial.parseInt(); // Get the value from the monitor.
if (value == 0) // Use the previous value stored.
EEPROM.get(0, value);
else
EEPROM.put(0, value); // Store the new value in the EEPROM
Serial.print("Value is ");
Serial.println(value);
}
void loop()
{}