How are the positions saved between power ups?

I found this project on youtube. I really like it and was trying to figure out how it worked. I think I figured out a lot of it and can figure out most of the coding. The one thing I can't figure out for the life of me is how the 6 positions are saved even when the power to the arduino stops. I like the idea of programming the position in real world situation and saving it because track alignment is key.

Can you point me to the right direct or at least a possible solution?

You monitor the voltage, when it reaches a fail level (let's say 4volts) you write to EEPROM the variables needed.
At power up, you read the variables out of EEPROM then continue.
.

EEPROM. Write the values only when saved and read them back at power up. See the built-in EEPROM library for examples.

LarryD:
You monitor the voltage, when it reaches a fail level (let’s say 4volts) you write to EEPROM the variables needed.
At power up, you read the variables out of EEPROM then continue.
.

NO! This is how you corrupt the contents of EEPROM. Read the section in the device datasheet “Preventing EEPROM Corruption”. It’s page 20, section 8.4.2 for the ATmega328.

It works in my projects.

avr_fred:
EEPROM. Write the values only when saved and read them back at power up. See the built-in EEPROM library for examples.

Thanks!

avr_fred:
NO! This is how you corrupt the contents of EEPROM. Read the section in the device datasheet "Preventing EEPROM Corruption". It's page 20, section 8.4.2 for the ATmega328.

That NO! does not follow the information given. It simply says:-

7.4.2
Preventing EEPROM Corruption
7.5
I/O Memory
During periods of low VCC, the EEPROM data can be corrupted because the supply voltage is too low for the CPU and the EEPROM to operate properly. These issues are the same as for board level systems using EEPROM, and the same design solutions should be applied.
An EEPROM data corruption can be caused by two situations when the voltage is too low. First, a regular write sequence to the EEPROM requires a minimum voltage to operate correctly. Secondly, the CPU itself can execute instructions incorrectly, if the supply voltage is too low.
EEPROM data corruption can easily be avoided by following this design recommendation:
Keep the AVR RESET active (low) during periods of insufficient power supply voltage. This can be done by enabling the internal Brown-out Detector (BOD). If the detection level of the internal BOD does not match the needed detection level, an external low VCC reset Protection circuit can be used. If a reset occurs while a write operation is in progress, the write operation will be completed provided that the power supply voltage is sufficient.