I need to save accelerometer values to the EEPROM so that when my Uno starts up again, it doesn't need to be re-calibrated.
EEPROM.write(0, trigger); //the float (trigger) is converted to an int, which is okay EEPROM.read(0); //when I read and save it to a float var it seems to be okay
I need to save negative numbers, a simple eeprom.write() won't do it.
I read this article : http://playground.arduino.cc/Code/EEPROMWriteAnything, but it didn't really helped.
I'm not exactly sure how to use a signed or cast function, I'm a little stumped. I just want to be able to save a negative number from 0 to -255 (an angle to start a motor) into the eeprom and be able to retrieve it.