Loading...
Pages: [1]   Go Down
Author Topic: Storing Sensor Calibraion Values in Arduino?  (Read 377 times)
0 Members and 1 Guest are viewing this topic.
Derbyshire
Offline Offline
Newbie
*
Karma: 0
Posts: 33
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: 96
Posts: 6331
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Thank you sir.

You can tell how new I am to this?

smiley-grin
Logged

Netherlands
Online Online
Tesla Member
***
Karma: 86
Posts: 9354
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 -

Pages: [1]   Go Up
Print
 
Jump to: