Book Image

Building Smart Drones with ESP8266 and Arduino

By : Syed Omar Faruk Towaha
Book Image

Building Smart Drones with ESP8266 and Arduino

By: Syed Omar Faruk Towaha

Overview of this book

With the use of drones, DIY projects have taken off. Programmers are rapidly moving from traditional application programming to developing exciting multi-utility projects. This book will teach you to build industry-level drones with Arduino and ESP8266 and their modified versions of hardware. With this book, you will explore techniques for leveraging the tiny WiFi chip to enhance your drone and control it over a mobile phone. This book will start with teaching you how to solve problems while building your own WiFi controlled Arduino based drone. You will also learn how to build a Quadcopter and a mission critical drone. Moving on you will learn how to build a prototype drone that will be given a mission to complete which it will do it itself. You will also learn to build various exciting projects such as gliding and racing drones. By the end of this book you will learn how to maintain and troubleshoot your drone. By the end of this book, you will have learned to build drones using ESP8266 and Arduino and leverage their functionalities to the fullest.
Table of Contents (11 chapters)

Controlling the camera gimbal using ESP8266

In this section, we will make a custom gimbal with two-servo motors that can be controlled remotely. You need to buy a Servo bracket to install the servos. You can buy a cheap one like this: https://www.aliexpress.com/item/Servo-bracket-PT-Pan-Tilt-Camera-Platform-Anti-Vibration-Camera-Mount-for-Aircraft-FPV-dedicated-nylon/32697306736.html. You will need the following things:

  • ESP8266 or NodeMCU
  • Two-servo motors (SG90 mini gear micro servo preferred)
  • 5V power supply
  • Smart phone
  • Router (for Wi-Fi connection)

Let's see how this is done:

  1. Firstly, attach the servos to the bracket. Connect the servos to the ESP8266, as follows:
  1. From the diagram, you can see that the servos are connected to the GPIO pins of the ESP8266. GPIO 0 and GPIO 2 or D3 and D4, respectively. Now you need to write code for our ESP8266 but, before that, open...