Changes between Version 2 and Version 3 of ControlSystems/SoftwareTeam/Training/GettingStarted/UltrasonicRangefinder


Ignore:
Timestamp:
Oct 31, 2019, 1:36:32 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted/UltrasonicRangefinder

    v2 v3  
    11== Ultrasonic Rangefinder
    22
    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]
     3Robots 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]
    44
    55Create another program using the !TimedRobot java template and name it !UltrasonicTest. Modify the generated code as follows: