Arduino + HC-SR04

by guschabal in Circuits > Arduino

2134 Views, 10 Favorites, 0 Comments

Arduino + HC-SR04

Arduino + HC-SR04

assembling

Video

This projects consists to use the HC-SR04 sensor with Arduino.

This sensor can be used to measure distances or overcome obstacles.

How this happend?

Well, one transducer send a ultrasonic signal , an the other waits for captured the signal when return.

Let's get started!

Required Hardware

  1. Arduino
  2. Sensor HC-SR04
  3. Wires
  4. Breadboard
  5. Rule

Circuit

This same diagram created with Fritzing was as connect all circuit.

The sensor consists of 4 pins:

  1. "VCC" connected to the output of 5V.
  2. "Trig" connected to digital pin board responsible for sending the ultrasonic pulse.
  3. "Echo" to the digital input pin to receive the echo said pulse.
  4. "GND" grounded.

Code

The code has the explanation how the signal is obtained.