Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. # Ultrasonic Sensor
  2. ## Plug It In
  3. Look at the side of the board to see the pin labels.
  4.  
  5. Vcc --> 5V
  6.  
  7.  
  8. Trig --> 2
  9.  
  10.  
  11. Echo --> 3
  12.  
  13.  
  14. Gnd --> GND
  15.  
  16. ## C++ Code
  17. ```
  18. void setup() {
  19. setup_hcsr04();
  20. }
  21. void loop() {
  22. float d = readDistance();
  23. }
  24. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement