Skip to Content
Building Smart Drones with ESP8266 and Arduino
book

Building Smart Drones with ESP8266 and Arduino

by Syed Omar Faruk Towaha
February 2018
Intermediate to advanced
212 pages
4h 59m
English
Packt Publishing
Content preview from Building Smart Drones with ESP8266 and Arduino

Avoiding obstacles using ESP8266

We will use a sensor to sense any object in front of it. We will use an ultrasonic sensor (HC-SR04 preferred). The intensity of the sensor will be shown by our Blynk app. So, let's start with the connection.

Connect the D1 and D2 to the Tring and Echo pins respectively. Since the sensor needs a 5V power supply, we will use an external battery to power it up. We will also use the same battery to power the NodeMCU after uploading the code. The pinout is as follows:

HC-SR04 NodeMCU
Trig D1
Echo D2
GND GND
VCC Vin

Refer to the following circuit diagram for clarification:

Refer to the following ...

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

ESP8266 Robotics Projects

ESP8266 Robotics Projects

Pradeeka Seneviratne

Publisher Resources

ISBN: 9781788477512Supplemental Content