Refer to Figure 6.17 for connection details:
As shown in Figure 6.17:
- The Gnd terminal of the sensor is connected to GND (pin 34) of Raspberry Pi
- The Echo terminal of the sensor is connected to GPIO 21 (pin 40) of Raspberry Pi with a 330 Ω resistor in between
- One more connection is taken out from the Echo terminal with a 470 Ω resistor in between, from a point marked as Joint 2, and connected to the GND terminal of Raspberry Pi through Joint 1
- The Trig terminal of the sensor is connected to GPIO 16 (pin 36) of Raspberry Pi
- The Vcc terminal of the sensor is connected to +5V (pin 04) of ...