Hi , I want to use a Sharp GP2Y0A02YK distance sensor with PIC16F88 using ADC , and after read the datashet i see that the math use floating point numbers.
Someone can guide me to solve this math in PBP3.
Example 1
A curve fit formula is used to approximate distance as a function of voltage:
D= A + B X / 1 + C X + D X( SQR 2)
where
D = Distance (cm)
V = Voltage (V)
A = 0.008 271
B = 939.6
C = -3.398
D = 17.339
Example 2
Distance in (mm) = 1420000 / (output voltage (mV) - 1091
Someone can guide me to solve this math in PBP3.
Example 1
A curve fit formula is used to approximate distance as a function of voltage:
D= A + B X / 1 + C X + D X( SQR 2)
where
D = Distance (cm)
V = Voltage (V)
A = 0.008 271
B = 939.6
C = -3.398
D = 17.339
Example 2
Distance in (mm) = 1420000 / (output voltage (mV) - 1091
Comment