LINE FOLLOWER THAT REMEMBERS THE PATH

i have started the motors if you see. the "value" that is read from EEPROM is the "state". and I have given code that if state is 1,2,3,or 4 then the motor will work accordingly by calling modeOne,modeTwo functions.

state is storing whether the motor is moving front , left , right or stopped.

if the robot is stopped i.e. the state is 4 and the interrupt is called every 20 ms therefore if state ==4 loop is executed and then after this as the robot is stopped. the output loop will be executed, in output loop "state" is read from EEPROM as "value".