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:
2:40ae18445079
Parent:
1:2053662b1167
Child:
3:b56e933bebc2
--- a/TRP105F_Spline.h	Tue Feb 16 07:52:38 2016 +0000
+++ b/TRP105F_Spline.h	Tue Feb 16 11:19:39 2016 +0000
@@ -1,13 +1,16 @@
 /**
  *  TRP105F_Spline.h,.cpp
  *
- *  -   This library is for provide a distance from TRP105F, proximity sensor,
+ *  Author: aktk, aktk.j.uec@gmail.com
+ *  Tokyo, Japan.
+ *
+ *  -   This library is for providing a distance from TRP105F, photo-reflect proximity sensor,
  *  to whatever reflect the flash.
- *  -   Deistance is derived from a voltage signal of TRP105F.
+ *  -   Deistance is derived as a voltage signal of TRP105F.
  *  -   An object of TRPFS class has an array of sets of
  *  distance(16 bit-value) and voltage(16bit-value) at the distance.
- *  -   The range of distances that an array has in sets is [0:1024] by 1.
- *  -   an array is derived from a spline curve model.
+ *  -   The range of distances that an array has in sets is [0:255] by 1.
+ *  -   an array is derived from a cubic spline curve model.
  *  -   In order to derive spline curve, some value sets should be got
  *  at the first calibration.
  *
@@ -16,7 +19,7 @@
  *  ver.2   2015/10/22 -
  *      Distance data type has become unsigned short from int.
  *      Distance data range : [2:20] by 1 -> [0:1024] by 1.
- *  ver.2.1 2016/02.12 -
+ *  ver.2.1 2016/02.12 - 2016/02/16
  *      Distance data range : [0:1024] -> [0:255].
  */
 #ifndef TRP105F_Spline_H
@@ -39,6 +42,7 @@
 
 //
 //  TRP105FS Class for get distance from voltage
+//
 /////////////////////////////////////////////////////////////////////////////////
 ////    At calibration, at sampling data, first the class send '>' via serial com, 
 ////  after which You can send distance data [0:255](in ver2.2).