Regarding arduino EEPROM Problem

Facing problem unable to unlock the secretCode.

From the first time I upload the program code to arduino board which can unlock the initial secretCode(1234) and then press “*” to change the secretCode and it still can unlock the secretCode I changed. Afterward, I forgot my secretCode and I reupload the program code. Now I pressed the initial secretCode which unable to unlock.

Kindly let me know is it my arduino board damaged either the program code problem.

Thanks

sketch_may12a.ino (2 KB)

With fear of you trying to hack your little brothers arduino:
Create a small arduino code that writes a new code into the EEPROM places…

#include <EEPROM.h>

void setup() {
  EEPROM.write(1, 1);
  EEPROM.write(2, 2);
  EEPROM.write(3, 3);
  EEPROM.write(4, 4);
  }

void loop() {
   
  
}

Or better: Read your forgotten code:

#include <EEPROM.h>

void setup() {
  Serial.begin(9600);
  int i = EEPROM.read(1);
  Serial.print(i);
  i = EEPROM.read(2);
    Serial.print(i);
  i = EEPROM.read(3);
    Serial.print(i);
  i = EEPROM.read(4);
    Serial.print(i);
  }

void loop() {
   
  
}