Hello,
I'm using an Uno R3 in my project. I'm trying to set a pH value, and calibrate a pH probe and store those values in EEPROM so the program can retain them in the event of a power off.
The pH value that's being set is a float type (with only the first decimal place really being important. )
the calibration values are calculated and stored as int.
I'm using EEPROM.put() and EEPROM.get() to read and write.
Upon the initial EEPROM.get(), there was gibberish, which I expected on the first go. I did an EEPROM.put() with my value and unplugged. Upon powering back up, the proper value was still there, as hoped.
However, I had it unplugged over the weekend and upon powering back up there was gibberish again. I started over, resaved (EEPROM.put() ), and it worked as intended over a few on/off cycles. But after several more cycles of on/off, it randomly popped up with gibberish again.
Does anyone know if this is normal? Maybe I can't mix and match data types (float in spot 0; ints in spots 1,2,3)? Should the float be an unsigned long (although the example: https://www.arduino.cc/en/Reference/EEPROMPut is using a float)?
Would a SD card be more reliable? It would just be major overkill for storing one float and three ints.
