Changes between Version 1 and Version 2 of ControlSystems/Sensors/Ultrasonic


Ignore:
Timestamp:
Oct 11, 2018, 1:11:15 PM (7 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/Sensors/Ultrasonic

    v1 v2  
    2222    3. Plug connector B into another DIO port (let's say DIO 1)  with the white wire towards the INSIDE edge of the roboRIO
    2323
    24 You can then use the ultrasonic sensor in your programs by just creating an Ultrasonic class (everything is already done for you by WPILib).  A sample snippet is below:
     24You can use the ultrasonic sensor in your programs by creating an Ultrasonic object.  WPILib already provides an [http://first.wpi.edu/FRC/roborio/release/docs/java/edu/wpi/first/wpilibj/Ultrasonic.html Ultrasonic class] that makes things easy.  A sample snippet is below:
    2525{{{
    2626import edu.wpi.first.wpilibj.Ultrasonic;
     
    4444
    4545Students should first get comfortable using the sensor and displaying the range readings on the console, a good next exercise is to add collision avoidance to a robot.
     46
     47* [https://www.mouser.com/ds/2/813/HCSR04-1022824.pdf HC-SR04 Datasheet]