EEPROM.get Trouble: I get a "nans" for the value

I attached a schetch that is suppose to write to Eprom a float "Target"

EEPROM.put(0, Target); is the line.

Next time I boot, I am trying to retrieve that float in setup;

EEPROM.get(0, Target);

However I get a "nans" for the Target.

I am playing with the knob that varies the "Target" so I should think the function records the value, but it does not seem to work. Pls help.

Thanks

TFT_Display_13_5xAverage.ino.ino (14.8 KB)

Try use both "EEPROM.put(0, Target);" and "EEPROM.get(0, Target);" into the void loop.

(deleted)

spycatcher2k:
Try
Target = EEPROM.get(0);

That is the syntax for EEPROM.read() but not for EEPROM.get(), which is EEPROM.get(address, variable) where variable has previously been declared and hence the get() function knows the data type and how many bytes to read.