Skip to Content
Internet of Things with Raspberry Pi 3
book

Internet of Things with Raspberry Pi 3

by Maneesh Rao
April 2018
Intermediate to advanced
248 pages
5h 31m
English
Packt Publishing
Content preview from Internet of Things with Raspberry Pi 3

Interfacing an ultrasonic sensor HC-SR04

Refer to Figure 6.17 for connection details:

Figure 6.17

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Raspberry Pi

Learning Raspberry Pi

Samarth Shah, Serge Schneider
Raspberry Pi 3 Home Automation Projects

Raspberry Pi 3 Home Automation Projects

Shantanu Bhadoria, Ruben Oliva Ramos

Publisher Resources

ISBN: 9781788627405Supplemental Content