23,99 €
The ESP8266 Wi-Fi module is a self-contained SOC with an integrated TCP/IP protocol stack and can give any microcontroller access to your Wi-Fi network. It has a powerful processing and storage capability and also supports application hosting and Wi-Fi networking.
This book is all about robotics projects based on the original ESP8266 microcontroller board and some variants of ESP8266 boards. It starts by showing all the necessary things that you need to build your development environment with basic hardware and software components. The book uses the original ESP8266 board and some variants such as the Adafruit HUZZAH ESP8266 and the Adafruit Feather HUZZAH ESP8266 . You will learn how to use different type of chassis kits, motors, motor drivers, power supplies, distribution boards, sensors, and actuators to build robotics projects that can be controlled via Wi-Fi. In addition, you will learn how to use line sensors, the ArduiCam, Wii Remote, wheel encoders, and the Gripper kit to build more specialized robots.
By the end of this book, you will have built a Wi-Fi control robot using ESP8266.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 130
Veröffentlichungsjahr: 2017
BIRMINGHAM - MUMBAI
Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: November 2017
Production reference: 1281117
ISBN 978-1-78847-461-0
www.packtpub.com
Author
Pradeeka Seneviratne
Copy Editors
Safis Editing
Ulka Manjrekar
Reviewer
Shweta Gupte
Project Coordinator
Kinjal Bari
Commissioning Editor
Gebin George
Proofreader
Safis Editing
Acquisition Editor
Prachi Bisht
Indexer
Pratik Shirodkar
ContentDevelopmentEditor
Trusha Shriyan
Graphics
Kirk D'Penha
Technical Editor
Sayali Thanekar
Production Coordinator
Nilesh Mohite
Pradeeka Seneviratne is a software engineer with over 10 years of experience in computer programming and systems design. He is an expert in the development of Arduino and Raspberry Pi-based embedded systems. Pradeeka is currently a full-time embedded software engineer who works with embedded systems and highly scalable technologies. Previously, he worked as a software engineer for several IT infrastructure and technology servicing companies. He collaborated with the Outernet project as a volunteer hardware and software tester for Lighthouse and Raspberry Pi-based DIY Outernet receivers based on Ku band satellite frequencies. He is also the author of five books:
Internet of Things with Arduino Blueprints
[Packt Publishing]
IoT: Building Arduino-Based Projects
[Packt Publishing]
Building Arduino PLCs
[Apress]
Raspberry Pi 3 Projects for Java Programmers
[Packt Publishing]
Beginning BBC micro:bit
[Apress]
Shweta Gupte is an embedded systems engineer with 4 years, experience in the robotics field. Shweta has worked with robots both at the software level and with a low-level hardware interface. She has experience of working with embedded system design, RTOS, microcontroller programming, and the low-level interfacing of robots, motion planning, and computer vision.
Shweta has experience in programming in C, Embedded C, JAVA, MATLAB, and microcontroller assembly language. She has worked with low-level controllers, including Renesas RX62, Renesas QSK, Arduino, PIC, and Rasberry Pi.
Currently, she is working at Mathworks to develop MATLAB and Simulink products for robotics and embedded targets, including developing automated test beds and hardware testing. She has a masters degree in electrical engineering and a bachelors degree in electronics and telecommunications.
Her interests include playing with low-cost microcontroller-based robots and quadrotors. She likes to spend her spare time rock climbing and fostering rescued dogs.
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at http://www.amazon.com/dp/1788474619.
If you'd like to join our team of regular reviewers, you can email us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
Getting Ready
ESP8266EX
ESP-01
Board features and connections
Connections
Connecting with a breadboard
Power supply
Connecting through USB for flashing
Using a serial terminal program
AT commands
Using AT commands
Using the Arduino IDE
Installing the Arduino core for an ESP8266 Wi-Fi chip
Hello world
Listing 1-1 – Blink a LED
Using chassis kits and accessories to build robots
Mini 3-Layer Round Robot Chassis Kit
Zumo chassis kit
Romi chassis kit
Mini robot rover chassis kit
Rover 5 robot platform
Wheel encoder kit
Parallel Gripper Kit A - Channel mount
Summary
Building a Mini Round Robot with Original ESP8266
Things you will need
Assembling the Mini 3-Layer Round Robot chassis kit
Assembling the wheels
Assembling the chassis
Attaching 9V battery box to the chassis layer
Connecting the middle chassis
Attaching 4 x AA battery box to the chassis layer
Mounting the Arduino board
Wiring them together
Connecting the Arduino with motor driver
Connecting the motors with the motor driver
Connecting the ESP01 with Arduino
Writing sketches
Using Blynk
Installing the Blynk library for Arduino
Writing the Arduino sketch
Working with the Blynk Sketch Code Builder
Listing 2-1 – Example code generated with the Blynk Sketch Code Builder
Listing 2-2 – complete sketch for mini round robot
Uploading the sketch
Applying power
Playing the robot
Summary
Using Encoders
Things you will need
The Wheel Encoder Kit
Connecting the encoders with motors
Wiring the encoders with Arduino
Reading encoders
Creating a Blynk app
Writing an Arduino sketch
Listing 3-1 – Displaying average of the pulses generated by the two wheel encoders (the hall-effect sensors)
Calculating the distance traveled
Calculating the average speed
Listing 3-3 – Calculating and displaying the average speed
Playing the 3-Layer Mini Round Robot
Summary
Building a Mini Round Robot with the Feather HUZZAH ESP8266
Things you will need
What is Feather HUZZAH ESP8266?
The DC Motor + Stepper FeatherWing
Downloading the Adafruit Motor Shield V2 library
Assembling the robot
Creating a Blynk app
Writing the Arduino UNO sketch
Listing 4-1 – Arduino sketch for controlling the Mini Round Robot
Testing the robot
Summary
Line-Following Zumo Robot
Things you will need
Assembling the Zumo chassis Kit
Attaching the Feather Doubler
Building a line-following course
Writing Arduino sketch
Listing 5-1 – Arduino sketch for line-following
Uploading the sketch
Playing with your robot
Summary
Building an ESP8266 Robot Controller
Things you will need
Building the Romi Robot
Ball casters
Battery contacts
Motors
Wheels
The battery compartment and power distribution
Attaching the FeatherWing Doubler
Building the Robot Controller
Software
Arduino sketch for the Robot Controller
Coding the Romi Robot
Listing 6-2 – Arduino sketch for the Robot
Play it
Summary
Building a Gripper Robot
Things you will need
Mini Robot Rover chassis kit
Assembling the chassis
Assembling the Gripper Kit
Connecting the gripper to the chassis
Assembling electronics
Controlling the gripper with Blynk
Creating the Blynk app
Software
Testing the gripper
Summary
Photo Rover Robot
Things you will need
Rover 5 chassis
Connecting the electronics
Wiring the ArduCAM with the Feather HUZZAH ESP8266
Software
Arduino libraries
Summary
This book is all about robotics projects based on the original ESP8266 microcontroller board and some variants of ESP8266 boards. The ESP8266 Wi-Fi module is a self-contained SOC with an integrated TCP/IP protocol stack that can give any microcontroller access to your Wi-Fi network. It has powerful processing and storage capabilities. It also supports application hosting and Wi-Fi networking.
The first chapter explains everything that you need to build your development environment with basic hardware and software components. This book uses an original ESP8266 board and an AdafruitFeather HUZZAH ESP8266 board for all the robotic projects. You will also learn how to use different types of chassis kits, motors, motor drivers, power supplies and distribution boards, sensors, and actuators to build robotic projects that can be controlled via Wi-Fi. You will also use line sensors, ArduCam, wheel encoders, and a Gripper Kit to build more specialized robots.
Chapter 1, Getting Ready, introduces the original ESP8266, that is, ESP-01, sets up a development environment with the hardware and software needed to write code for ESP8266, and explains how to use the Arduino Core to write code for ESP8266 boards with the Arduino IDE. This chapter will also present how to use the AT command with PuTTY to execute on an ESP8266.
Chapter 2, Building a Mini Round Robot with Original ESP8266, explains how to build a Mini Round Robot using the Mini 3-Layer Round Robot Chassis Kit with the ESP-01 board, Arduino, and some electronics. This chapter will also explain how to develop a Blynk app to control the robot through a Wi-Fi network.
Chapter 3, Using Encoders, shows how to modify the Mini 3-Layer Round Robot you built in the previous chapter by integrating a wheel encoder kit to calculate average speed and distance traveled based on the pulses generated by the hall-effect sensors. This chapter will also explain how to modify the Blynk app you built in the previous chapter to show the calculated average speed and distance traveled.
Chapter 4, Building a Mini Round Robot with the Feather HUZZAH ESP8266, shows how to replace the original ESP8266 board with a physically smaller and more lightweight Feather HUZZAH ESP8266 board. The chapter will also explain how to develop a Blynk app to control the robot through a Wi-Fi network.
Chapter 5, Line-Following Zumo Robot, teaches how to build a robot that follows a line, either a black line on a white surface or a white line on a black surface, by integrating a Line Follower Array. The chapter will also explain how to build a line following course.
Chapter 6, Building an ESP8266 Robot Controller, shows how to build an ESP8266-based simple Robot Controller that can be used to control a Romi Robot through a Wi-Fi network using Blynk Bridge.
Chapter 7, Building a Gripper Robot, explains how to build a robot based on the Mini Robot Rover chassis, a parallel Gripper Kit, and a servo motor. The chapter will also explain how to build a Blynk app to control the gripper through a Wi-Fi network.
Chapter 8, Photo Rover Robot, shows how to build a rover robot that can be used to take pictures with an ArduCAM from remote locations and view them using a web browser. The robot uses a web socket server that allows you to control the camera using a simple web-based interface. The same interface can be used to view the captured image as well.
To get the most from this book, you need a basic knowledge of programming with the Arduino IDE and electronics.
This book is for those who are familiar with robotics and want to build robotics projects using the ESP8266 microcontroller.
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.
To send us general feedback, simply email [email protected], and mention the book's title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
Log in or register on our website using your email address and password.
Hover the mouse pointer on the
SUPPORT
tab at the top.
Click on
Code Downloads & Errata
.
Enter the name of the book in the
Search
box.
Select the book for which you're looking to download the code files.
Choose from the drop-down menu where you purchased this book from.
Click on
Code Download
.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
WinRAR / 7-Zip for Windows
Zipeg / iZip / UnRarX for Mac
7-Zip / PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/ESP8266-Robotics-Projects. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/