FRC1076 / 2019-Competition

Code for 2019 Competition
2 stars 1 forks source link

Create local version of sonarSensor (directly connected from Rio to Sonar unit). #89

Open mcolinj opened 5 years ago

mcolinj commented 5 years ago

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).

mcolinj commented 5 years ago

8 is trigger on the rio for the down facing sonar 9 is echo.

mcolinj commented 5 years ago

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.