I have been trying to use the vex ultrasonic sensor on the FRC robot and have had no success. I think the problem may be in the way i wired the sensor. I have both the wires going into the Digital I/O on the sidecar ports 3,1. I am using the WPILib ultrasonic class and can only manage to read zeros. Also on the driver station, under the diagnostics tab, the error messages box keeps saying assertion failed. Can some one help me get this sensor to read values or should i just order a “FRC” sensor.
We are having the same problems and error, the sensor is not showing any distance changes but is staying at 0. The error appears on the driver’s station diagnostic tab.
Assertion Failed: “m_downSource!=NULL” in clearDownSource() in c:/windriver/workspace/wpilib/counter.cpp at line 337.
We had the assert error with the vex sensors in the prior WPILib release, but the current WPILib release no longer asserts. Which is good
However, for some reason our sensors work inconsistently – most of the time they read 120 or 249 – but if I put my hand right in front of it, then it will read a few inches… maybe out to 5 inches or so before it jumps back to 249. I’m hoping it’s a wiring problem (it worked at first with the previous version, but then it started exhibiting the 120/249 behavior and I couldn’t get it to work correctly), but maybe not.