Skip to main content
Top

2012 | Book

Beginning Android ADK with Arduino

insite
SEARCH

About this book

Whether you're new to Arduino and Android development, or you've tinkered a bit with either one, this is the book for you. Android has always been a natural fit with Arduino projects, but now that Google has released the Android Open Accessory Development Kit (the Android ADK), combining Android with Arduino to create custom gadgets has become even easier.

Beginning Android ADK with Arduino shows how the ADK works and how it can be used with a variety of Arduino boards to create a variety of fun projects that showcase the abilities of the ADK.

Mario Böhmer will walk you through several projects, including making sounds, driving motors, and creating alarm systems, all while explaining how to use the ADK and how standard Arduino boards may differ from Google-branded Arduinos. You aren't tied to specific hardware with this book; use what you have, and this book will show you how.

Table of Contents

Frontmatter
Chapter 1. Introduction
Abstract
In May 2011, Google held its annual developer conference, the Google IO, to present its newest technologies to approximately 5,000 attendees. In addition to improvements in its already well-known technologies such as the Google APIs or the core search technology, Google placed the focus on two major themes: Chrome and Android. As always, the newest advances in the Android Platform were presented and discussed, but what Google announced a bit later in the Android keynote was a bit of a surprise: Google’s first standard for Android devices to communicate with external hardware. The Android Open Accessory Standard and the Accessory Development Kit (ADK) will be the key for communicating with hardware and building external accessories for Android devices. To encourage development, Google handed out ADK hardware packages to interested attendees and showed some examples of ADK projects, such as a treadmill which transmitted data to a connected Android device and a huge tilt labyrinth, which could be controlled with an Android device. Shortly after the event, the first DIY projects surfaced which already showed the great potential of the ADK.
Mario Böhmer
Chapter 2. Android and Arduino: Getting to Know Each Other
Abstract
Now that you have learned about the basics of both the Android and Arduino platforms, it is time to let them get to know each other. This chapter will guide you through your first Android Open Accessory Development Kit (ADK) project. You will learn the specifics of the Open Accessory Protocol and how it is implemented on both sides. You will write the code foundation you will use throughout the book for all further examples. To learn about the lifecycle and the anatomy of the code examples, you will begin by coding the all-time favorite “Hello World” for both platforms.
Mario Böhmer
Chapter 3. Outputs
Abstract
An ADK board derived from the original Arduino design has several pins and connectors. The majority of those pins are digital pins. The digital pins on such an ADK board are capable of being configured as inputs or outputs. This chapter describes how the digital pins can be used when configured as output pins.
Mario Böhmer
Chapter 4. Inputs
Abstract
In the context of the ADK board, inputs are pins and connectors on the board with which you can receive data or measurements. Although the common USB-type connectors are technically also inputs, this chapter will only concentrate on the inputs with which you can take measurements or detect digital state changes. The inputs in that sense are the pins of the ADK board.
Mario Böhmer
Chapter 5. Sounds
Abstract
The ADK board on its own is not capable of generating or detecting sounds. Luckily there is one component that can help with both of these tasks: the piezo buzzer.
Mario Böhmer
Chapter 6. Light Intensity Sensing
Abstract
In this chapter you will learn how to sense the intensity of light in your close environment. In order to do that you will need another new component, called a photoresistor or light dependent resistor (LDR). I will explain the operating principle of this component later in the section “The Parts.” But first you’ll need to understand the description of light itself.
Mario Böhmer
Chapter 7. Temperature Sensing
Abstract
Temperature sensors are broadly used in many household devices and industrial machinery. Their purpose is to measure the current temperature in their proximity. Often they are used for precautionary reasons—to keep sensitive components from overheating, for example—or just to monitor changes in temperature.
Mario Böhmer
Chapter 8. A Sense of Touch
Abstract
Touch user-interfaces have become increasingly part of our daily life. We see them on vending machines, home appliances, our phones, and our computers. Touch interfaces make day-to-day activities seem a little bit more futuristic and classy. When you are watching old science fiction movies you notice that, even back then, touch was the preferred way to imagine the user input of the future. Nowadays children are growing up with this kind of technology.
Mario Böhmer
Chapter 9. Making Things Move
Abstract
Probably one of the most interesting aspects of hobby electronics is building robots or making your projects move. There are many ways of achieving general movement depending on the use case. One common way to make a project move is through motors. Motors are referred to as actuators because they act on something rather than sense something, as sensors do. Different kinds of motors provide different levels of freedom of movement and power. The three most common motors are DC motors, servos, and stepper motors (see Figure 9-1).
Mario Böhmer
Chapter 10. Alarm System
Abstract
Now that you are comfortable with your ADK board and the different sensors and components you have used so far, it is time for something bigger. In the final chapter you will be combining some of the components you used in the previous chapters to build two versions of an alarm system. You will get to know new components—the tilt-switch and the IR light barrier, consisting of an IR LED and an IR detector—widely used in the real world for numerous applications. In two separate projects you will learn how to integrate these components into a small alarm system so that they trigger an alarm. On the hardware side, the alarm will be expressed by a blinking red LED and a piezo buzzer that generates a high-pitched sound. Your Android device will persist the alarm event in a log file and, depending on the current project, it will additionally either send a notification SMS or take a picture of the intruder and save it to your filesystem.
Mario Böhmer
Backmatter
Metadata
Title
Beginning Android ADK with Arduino
Author
Mario Böhmer
Copyright Year
2012
Publisher
Apress
Electronic ISBN
978-1-4302-4198-0
Print ISBN
978-1-4302-4197-3
DOI
https://doi.org/10.1007/978-1-4302-4198-0

Premium Partner