Library for Distance Sensors

direct link to the spreadsheet: http://gp2y0a21yk-library.googlecode.com/hg/Calculations/CalculationsDistanceSensorTransferfunctionLUT.xls
(works fine for me using LibreOffice)

The option for runtime calibration is planned for "Version 0.6: Compare different sensors, calculate replacement LUT (at runtime) based on calibration points" (copy past from header file :slight_smile: )

I currently have 5 sensors that are tied together sitting on my desk.
My plan is to do this runtime testing/calibration using 5 sensors to check for inter-sensor differences.
I haven't done the experiment yet because I needed some extra wires + breadboard, to connect them all at the same time.

It think the best approach would be conditional compilation with 3 options:

  • speed optimized: my current code
  • code size optimed: the multimap version using your approach
  • default: 4(?) bit LUT combined with multimap

A more (too?) complex solution might be:

  • a standard generic LUT: 8 bits
    • a 'differential' LUT for each individual sensor: using calibrated values: 4 bits

Lots of possibilities...