Open mcolinj opened 5 years ago
8 is trigger on the rio for the down facing sonar 9 is echo.
The Ultrasonic contains the interface to be a PID data source, so we don't need to wrap it. I've committed the code we wrote to rio-ultrasonic branch. It also enables the elevator.
Create a localSonar sensor implementation that provides the same interface as the remote version. Have it wrap the ultraSonic and get it's range data (in cm) from there.
https://robotpy.readthedocs.io/projects/wpilib/en/latest/wpilib/Ultrasonic.html
You may work from the code in the sonar_and_vision_william branch if you want to see the reference interface to the remote version (sonar over UDP).