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

Chapter 2. Controlling an Arduino Board via Bluetooth

This second chapter of the book will be about putting things together and writing our first app to control an Arduino board via Bluetooth Low Energy (BLE). We chose to use BLE for all the Bluetooth projects of this book as it is the latest standard for Bluetooth communication at the time of publication. Compared to previous Bluetooth modules, BLE modules have low energy consumption as the standard works in bursts rather than maintaining a persistent connection. In addition, BLE offers low latency and has a comparable range to the older Bluetooth standards.

We will connect a BLE module to Arduino as well as an LED that we will control via an Android app. Then, we will write an Arduino sketch that uses the aREST library so that we can receive commands via Bluetooth coming from a smartphone or tablet.

The Android app will also be able to control the board remotely and we will have the opportunity to enhance the user experience by learning...