Go Down

Topic: Change EEprom address with buttons, storing data to different locations (Read 290 times) previous topic - next topic


 Please delete post. I think I know what to do. =)

 Hi all!  First post!!!  :)

Okay, I'm looking here and elsewhere and I am getting the idea of saving some data to an EEprom address.

But I want to be able to save data, for example the state of a pin, high or low , to a location in eeprom.

Then, I'd like to have a button to increment the data location to an empty location.

and save the pin state to this new location.


2 pins default to HIGH

I push a button to switch one pin to LOW

I now save this to eeprom

I now make pin 2 low and now save this to another memory location


Address 0 is lets say for grins and giggles both pins LOW
Address 1 is pin1 low and pin2 high
Address 2 is pin1 low and pin2 low

I use buttons to switch pin states ( this I know how to do )

I use another button to SAVE the pin state to an EEPROM address ( I think I got this )
I use a third button to INCREMENT EEPROM address ( I am not sure how to do this )
I use a fourth button to DECREMENT EEPROM address ( I am not sure how to do this )

The reason of my struggles is I need 8 pins. So 8 bits. But I don't know how to save in increments of 8 bits, then MOVE to a NEW set of EMPTY 8 bits. etc etc etc.....

Go Up