Log in

View Full Version : Vex Ultrasonic Range Module


moomoomoo309
06-02-2016, 17:06
We tried finding distance using this module (http://www.vexrobotics.com/276-2155.html), and after connecting it correctly, it keeps either not working (isRangeValid() is false, returns 0 on getRangeInches() and getRangeMM()) or returning infinity (isRangeValid() is true, returns Double.POSITIVE_INFINITY (the infinity symbol) from getRangeInches() and getRangeMM()). Has anyone else had luck getting one of these working in Java? It's hooked up to the DIO ports currently.

gblake
06-02-2016, 20:52
We tried finding distance using this module (http://www.vexrobotics.com/276-2155.html), and after connecting it correctly, it keeps either not working (isRangeValid() is false, returns 0 on getRangeInches() and getRangeMM()) or returning infinity (isRangeValid() is true, returns Double.POSITIVE_INFINITY (the infinity symbol) from getRangeInches() and getRangeMM()). Has anyone else had luck getting one of these working in Java? It's hooked up to the DIO ports currently.

Is there a good target in front of it? If yes, at what distance?

moomoomoo309
11-02-2016, 17:28
I placed it facing towards the floor, within a few inches (<10). It continued to return ∞. I rebooted the robot, and hasDistance() returned false, and it returned 0 again. (I haven't changed how I wired this sensor!)