My sketch needs to store int numbers between 0 and 3000. I need to store just one number. Is there a lib function which does this or do I have to break up the number manually and store it in 2 or 3 locations? Thanks.
JC
My sketch needs to store int numbers between 0 and 3000. I need to store just one number. Is there a lib function which does this or do I have to break up the number manually and store it in 2 or 3 locations? Thanks.
JC
Did you look at eeprom write anything library?
At the same time, is not that hard to use
val1 = lowByte(yourInt);
val2 = highByte(yourInt);
to break the number up before making the EEPROM access call.
Thanks for the quick reply. I looked under LIBRARIES - EEPROM on the Arduino Reference page but it didn't have alot of info. I'll look into that lib you mention.
JC
#include <EEPROM.h>
EEPROM.write(0, (lowByte (displayEnd)));
EEPROM.write(1, (highByte (displayEnd)));
0,1 is the address being written to
displayEnd is the int that I had as a pointer to the end of an array.