This lib is supposed to be used as a sensor's calibration or control program. This makes Cubic Spline Model from some sample plots(sets of (value, voltage)), and then discretize the model (dividing the range of voltage into some steps) in order to use the calibrated model data without getting the INVERSE function.

Revision:
9:ec1ee4a6b6a4
Parent:
5:7d4fc0979976
Child:
10:b50e4bb40571
--- a/TRP105F_Spline.h	Mon Jun 06 14:44:15 2016 +0000
+++ b/TRP105F_Spline.h	Mon Jun 06 15:38:23 2016 +0000
@@ -26,6 +26,8 @@
 #ifndef TRP105F_Spline_H
 #define TRP105F_Spline_H
 
+#define DEFALT_AI_PIN p16
+
 #include "mbed.h"
 
 
@@ -86,16 +88,18 @@
     //
     //  Variables
     //
+    //  Debug or Module
     UseType         _useType;
+    //  For data sampling and making spline model
     unsigned int    _Sample_Num;    // the number of samples for derive spline
     VDset*          _Sample_Set;
+    double*         _u_spline;
+    //  For comvert voltage -> physical quantity e.g. distance
     VDset           _Set[_ENUM];
     unsigned short  _Threshold[_ENUM]; //_Threshold[18] is not used virtually.
-    double*         _u_spline;
+    //  For get voltage
+    AnalogIn        _ai;
     //
-    //  Variable for spi
-    //
-    //unsigned int _channel;
     //
     //  For calibration
     //