Help the newbie with the code

What you call "Source code to save in eeprom" seems to be an entire unrelated program. You would be better off to stick with the program you have and just add EEPROM functionality by researching it and plugging it in by design.