Pages: [1]   Go Down
Author Topic: Storing Sensor Calibraion Values in Arduino?  (Read 532 times)
0 Members and 1 Guest are viewing this topic.
Derbyshire
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I have two analog sensors - I would like to store my calibration values to my arduino uno rev3. (a min and max for each)

Importantly, the sensor values must be stored and remembered for when the devise is turned off.

I'm not sure the best way to go about this?


Does this board have any inbuilt features to store a few calibration figures? (I assume not)


My configuration also has the arduino wifi shield stacked on top (with a SD card slot). So i am assuming there is potential here.



Thanks for your time!
« Last Edit: September 09, 2012, 03:14:54 pm by Wi11turner » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8103
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Derbyshire
Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you sir.

You can tell how new I am to this?

smiley-grin
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12483
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Be aware that you only write to EEPROM when the calibration value changes as the EEPROM has limited write cycles (quite a lot but limited)

something like

if (newCalibrationValue != EEPROM.read(calib_addr)) EEPROM.write(calib_Addr, newCalibrationValue);

Reading is no problem.

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: