Hardware Reference
In-Depth Information
Solution
The HC-SR04 Ultrasonic Range Sensor (shown in Figure 2-12 ) works by sending a trigger
pulse to the Trigger input and then measuring the pulse width on the Echo output. The
width of the pulse tells you the distance.
Figure 2-12. HC-SR04 Ultrasonic range sensor
To make this recipe, you will need:
▪ Breadboard and jumper wires (see “Prototyping Equipment” )
▪ 10 kΩ and 20 kΩ resistors (see “Resistors” )
▪ HC-SR04 Ultrsonic Range Sensor (see “Miscellaneous” )
Wire the sensor as shown in Figure 2-13 . Note that the HC-SR04 is a 5 V device, so the
banded wire (running from P9_7 on the Bone to VCC on the range finder) attaches the
HC-SR04 to the Bone's 5 V power supply.
Search WWH ::




Custom Search