Book Image

Smart Internet of Things Projects

By : Agus Kurniawan
Book Image

Smart Internet of Things Projects

By: Agus Kurniawan

Overview of this book

Internet of Things (IoT) is a groundbreaking technology that involves connecting numerous physical devices to the Internet and controlling them. Creating basic IoT projects is common, but imagine building smart IoT projects that can extract data from physical devices, thereby making decisions by themselves. Our book overcomes the challenge of analyzing data from physical devices and accomplishes all that your imagination can dream up by teaching you how to build smart IoT projects. Basic statistics and various applied algorithms in data science and machine learning are introduced to accelerate your knowledge of how to integrate a decision system into a physical device. This book contains IoT projects such as building a smart temperature controller, creating your own vision machine project, building an autonomous mobile robot car, controlling IoT projects through voice commands, building IoT applications utilizing cloud technology and data science, and many more. We will also leverage a small yet powerful IoT chip, Raspberry Pi with Arduino, in order to integrate a smart decision-making system in the IoT projects.
Table of Contents (13 chapters)
Smart Internet of Things Projects
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Controlling a car robot from a computer


We can control our robot from a computer. This means that we can send commands to the robot to perform an action. In order to send a communication between a computer and robot, we need a communication module on both.

In this section, we will build a communication between the Pololu Zumo robot and a computer. I usually use Bluetooth modules as wireless stacks for communication.

For implementation, I use Bluetooth HC-06. This is a Bluetooth slave, so we can communicate directly through UART protocol. The Bluetooth HC-06 module is cheap, and you can buy it on banggood.com, eBay, dx.com, and AliExpress.

The Bluetooth HC-06 module has the following four output pins:

  • VCC

  • GND

  • Rx

  • Tx

A form of Bluetooth HC-06 module can be seen in the following figure:

To communicate with Bluetooth HC-06, I use the SoftwareSerial library (https://www.arduino.cc/en/Reference/SoftwareSerial). This library is supported for the AVR MCU model. If you use an Arduino-based ARM MCU, such as...