How exactly would this make the lib more generic? Since the only hardware specific code is the actual LUT.
That means the lib should have a reference to an external LUT in the constructor. (Could not open the spreadsheet BTW..)
What do you think of an option for runtime calibration?
Or a separate sketch that can generate the LUT? put the sensor at 10 cm press button, 20 cm press button etc
I plan to make one generic "DistanceSensor" lib, that supports other distance sensors.
Great , think the multimap approach can help to keep the different LUT's small !