Changes between Version 2 and Version 3 of ControlSystems/SoftwareTeam/Training/GettingStarted/UltrasonicRangefinder
- Timestamp:
- Oct 31, 2019, 1:36:32 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/Training/GettingStarted/UltrasonicRangefinder
v2 v3 1 1 == Ultrasonic Rangefinder 2 2 3 Robots often need to sense the environment around them, particularly when driving autonomously. Ultrasonic sensors are like the sonar used by bats.They emit a chirp of sound and measure the time it takes to hear an echo of that chirp. The longer the time, the further the sound traveled. Since sound travels at a particular speed through air, we can use the echo delay to calculate how far away the object was that reflected the sound. You can read more about ultrasonic sensors [https://wpilib.screenstepslive.com/s/currentCS/m/java/l/599715-ultrasonic-sensors-measuring-robot-distance-to-a-surface here]3 Robots need to sense the environment around them, particularly when driving autonomously. Ultrasonic sensors are like the sonar used by bats. [[Image(UltrasonicSensor.jpg,right,250px,margin=10)]] They emit a chirp of sound and measure the time it takes to hear an echo of that chirp. The longer the time, the further the sound traveled. Since sound travels at a particular speed through air, we can use the echo delay to calculate how far away the object was that reflected the sound. You can read more about ultrasonic sensors [https://wpilib.screenstepslive.com/s/currentCS/m/java/l/599715-ultrasonic-sensors-measuring-robot-distance-to-a-surface here] 4 4 5 5 Create another program using the !TimedRobot java template and name it !UltrasonicTest. Modify the generated code as follows: