Hello all!
I'm trying to read values from an ultrasonic sensor with an Arduino. For some reason, when using the pulseIn function, the value of pulseIn starts to return 0 far before expected. When I give it a timeout value of 888, I can't get it to return values of >240. Any suggestions?
withinInches is a float value set to 6.0
speedSound is float value set to 0.0135 (inches/usec)
Using these two values yields 888 as the rangeTimeout
Thanks for your consideration!
Edit: Full code can be found in the following link, but since the ultrasonic sensor is only one component of my project there is a lot of code irrelevant to this post.
Full Code