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

Working with the Pololu Zumo robot for Arduino


In this section, we will make a simple robot with simple movements based on avoiding obstacles. If the robot faces an obstacle, the robot will turn left to avoid it. To make this happen, we can use an Ultrasonic module to detect an obstacle.

I usually use HC-SR04 as an Ultrasonic module. It's cheap, and you can buy it on dx.com, banggood.com, and AliExpress. You can see the HC-SR04 module form in the following figure:

The HC-SR04 module provides four pins: VCC, GND, Trigger, and Echo. You can connect Trigger and Echo pins to Arduino digital I/O. But how can you connect the HC-SR04 module into Pololu Zumo robot for Arduino?

Based on the user guide from Pololu, you can connect them through Arduino digital I/O on pins 4, 11, 5, 2. The easier way is to connect HC-SR04 module via the front expansion pins. You can see this in the following figure:

For our demo wiring, connect Trigger and Echo pins to Arduino digital I/O on pins 2 and 4. The VCC and GND...