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
- Arduino
- Sensor HC-SR04
- Wires
- Breadboard
- Rule
Circuit
This same diagram created with Fritzing was as connect all circuit.
The sensor consists of 4 pins:
- "VCC" connected to the output of 5V.
- "Trig" connected to digital pin board responsible for sending the ultrasonic pulse.
- "Echo" to the digital input pin to receive the echo said pulse.
- "GND" grounded.
Code
The code has the explanation how the signal is obtained.