EEPROM int storage
i have project in there 2 buttons: forwards , back. every time forwards button pressed, variable, incremented 1 (i++) , every time button pressed, unincrements 1 (i--). automatically set 0 in setup after each power up. how can use eeprom remember value of int , automatically set variable value every time arduino powered up?
look @ eeprom libary.
it store bytes. split ints 2 bytes , write them sepratly. read them 2 bytes , combin them using shift operator on significant byte , or least significant byte.
it store bytes. split ints 2 bytes , write them sepratly. read them 2 bytes , combin them using shift operator on significant byte , or least significant byte.
Arduino Forum > Using Arduino > Storage > EEPROM int storage
arduino
Comments
Post a Comment