Go Down

Topic: Memory Advice Please? (Read 850 times) previous topic - next topic

nicman

Hi everyone.

Roughly...  this is what I want to do:
I'm reading a motor position on an analog pin.  I would like to move the motor to position A, and store the corresponding analog value...  then move the motor to position B, and store this new analog value.  I need to "remember" these two analog values, even after a power reset to Arduino.  Note that (for now) all I need to store are two analog values (max. two 4-digit integers?).

Can someone please recommend a memory device that would be suitable for this (EEPROM, Flash, etc.)...  the smaller the device, the better.  Also, I prefer that it run off of 5V.

Thanks!

RuggedCircuits

How about using the built-in EEPROM of the Arduino? Look at the EEPROM library:

http://arduino.cc/en/Reference/EEPROM

--
Beat707: MIDI drum machine / sequencer / groove-box for Arduino

nicman

Awesome!  I think I WILL make use of it.  :D

I'll start looking into it right away, thanks for the prompt response!!

retrolefty


Awesome!  I think I WILL make use of it.  :D

I'll start looking into it right away, thanks for the prompt response!!


The built in EEPROM is perfect for what you describe. Be aware that the basic eeprom read and write commands are for 8 bit byte values, it takes a little more software fineness to write and read integers or long variables, but is done all the time. I'm sure you can find good eeprom code examples if you look around.

Lefty

Go Up