Book Image

Arduino Android Blueprints

Book Image

Arduino Android Blueprints

Overview of this book

Table of Contents (17 chapters)
Arduino Android Blueprints
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

When directly comparing Arduino and Android, one can see that they are two incredibly different platforms with different targets. Arduino is mostly focused on connecting physical everyday objects to embedded microcontrollers. On the other hand, Android intends to provide the necessary operating system and framework to operate countless smartphones around the world.

This reality also reflects the contrasting realities of the authors, who come from very different backgrounds and cultures; Stefan hails from the Island of Malta, and he brings with him a medical background and passion for the intersection of technology and medicine, whereas Marco originates from France and has an electrical engineering background.

The power of combining the efforts of Arduino and Android platforms bring about incredibly implemented practical projects that enhance daily life. Keeping this motivation in mind is what brought two authors from contrasting backgrounds together to work on this book. We believe in the intersection of technology and real life and visualize a future where technology will keep on forming an integral part of our day-to-day life.

What this book covers

Chapter 1, Setting Up Your Workspace, covers the necessary steps that you will have to take in order to build all the projects of the book. You will learn how to set up the Android development environment. We will also build our first Arduino project.

Chapter 2, Controlling an Arduino Board via Bluetooth, teaches us how to link Arduino and Android for the first time. We will build an Arduino system with a Bluetooth Low Energy module, and control a simple LED from an Android application.

Chapter 3, Bluetooth Weather Station, teaches us how to build our first useful application using Arduino and Android. We will build a weather measurement station, and visualize the measurements via an Android application, which we will build from scratch.

Chapter 4, Wi-Fi Smart Power Plug, teaches us how to build a DIY version of a popular device: a wireless power switch. We will use an Android application to communicate with the switch via Wi-Fi, control it, and measure the energy consumption of the connected device.

Chapter 5, Wi-Fi Remote Security Camera, introduces a powerful Arduino board, the Arduino Yún, to build a DIY wireless security camera. We will also build an Android application to monitor this camera remotely from an Android phone.

Chapter 6, Android Phone Sensor, explains how to turn things around, and use the sensors from our phone to control the Arduino board. Applying this, we will use the gyroscope of the phone to control the angle of a servomotor.

Chapter 7, Voice-activated Arduino, teaches us how to use the powerful Android speech API to control an Arduino board via Bluetooth.

Chapter 8, Control an Arduino Board via NFC, shows how to use the NFC chip present in many Android phones to activate a relay connected to an Arduino board.

Chapter 9, Bluetooth Low Energy Mobile Robot, uses everything we learned so far in the book to build a mobile robot based on the Arduino. The robot will be controlled via Wi-Fi from an Android application.

Chapter 10, Pulse Rate Sensor, is dedicated to a medical application that measures the heart rate. We will connect a heart rate sensor to Arduino and monitor the measurements via Bluetooth Low Energy.

What you need for this book

You will need two kind of software for this book: the software you will need for Arduino, and the software you will need for Android. For Arduino, here is what you will need in all chapters:

  • Arduino IDE (Version 1.5.7 is recommended)

You will also need several Arduino libraries depending on the chapter, but the links to these libraries are given in the relevant chapters.

On the Android side, you will need the following:

  • Android Studio

  • Android 4.3 or higher on your Android phone

Who this book is for

Arduino Android Blueprints is aimed for anyone who is knowledgeable in either the Arduino or Android ecosystems and who would like to get started with building exciting applications using both platforms.

For example, this book is for you if you are already using the Arduino platform and you want to build mobile applications to control your projects remotely.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Your Arduino folder is where all the sketches are stored, and you can define this folder in the preferences of the Arduino IDE."

A block of code is set as follows:

android:textSize="200dp"
    android:gravity="center"

Any command-line input or output is written as follows:

/distance

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Depending on your device, this option might vary slightly, but as from Android 4.2 and higher, the Developer options screen is hidden by default."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via 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 on www.packtpub.com/authors.

Customer support

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.

Downloading the example code

You can download the example code files for all Packt books you have purchased 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 e-mailed directly to you.

Downloading the color images of this book

We also provide you a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from: http://www.packtpub.com/sites/default/files/downloads/0389OS_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.