Hello all,
I'm trying to zero a string pot to my arduino, it is a 0-5v sensor (power, signal, ground). I have a slope and an offset for the calibration of the sensor and this works well to display the sensor value in inches.
On the project, due the play in the system, the zero needs to be adjusted often. Essentially changing the offset value each time. I would like to do this using a toggle switch, whenever the user clicks the button, the Arduino would adjust the slope to read 0 inches at the time it is pressed.
How would I go about doing this? Any help is much appreciated. Attached is the code.
Thanks in advance
Linear_Potentiometer_Calibration.txt (490 Bytes)