Hi all,
I am trying to use IR distance sensor (PID: 164) to measure the distance of my object.
My adafruit shield and arduino uno are set up.
When I read the voltage of the sensor using readVoltage(a,'analog_pin#'), the voltage fluctuates very much even though the object reflecting is stationed still.
Is there an equation I can use to derive an accurate distance?
Thanks,
Best way to use IR distance sensor
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88086
- Joined: Sat Feb 07, 2009 10:11 am
Re: Best way to use IR distance sensor
The output of these does tend to be a bit noisy. You may need to average a bit over time to get a steady reading.
Here is a library that does that for you: http://playground.arduino.cc/Main/SharpIR
Here is a library that does that for you: http://playground.arduino.cc/Main/SharpIR
Please be positive and constructive with your questions and comments.