Arduino Android Blueprints
Table of Contents
Arduino Android Blueprints
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Setting Up Your Workspace
Hardware and software requirements
Installing Java Developer Kit
Checking the JDK version
Mac
Windows
Installing Java
Installing Android Studio
Mac
Windows
Setting up the Android Software Development Kit
Setting up your physical Android device for development
Enabling Developer options
Enabling USB debugging
Entrusting the computer with the installed IDE using secure USB debugging (devices with Android 4.4.2)
Hardware configuration
Learning to use the aREST library
Creating your first Android project
Setting up your first Hello Arduino project
Installing your app on your physical device
Summary
2. Controlling an Arduino Board via Bluetooth
Hardware and software requirements
Configuring the hardware
Writing the Arduino sketch
How to create a simple Android app to connect to the BLE module
Modifying the Android layout file
Connecting the modified layout to the corresponding activity
How to go further
Summary
3. Bluetooth Weather Station
Hardware and software requirements
Hardware configuration
Testing the sensors
Writing the Arduino sketch
Wireframing our Android application and modifying the layout files
Implementing Android layouts in the main activity
Enhancing the user interface
Creating and adding our very own app icon
Centering and enlarging the data output text
Modifying the buttons and adding some color to our text
How to go further
Summary
4. Wi-Fi Smart Power Plug
Hardware and software requirements
Configuring the hardware
Testing the relay
Writing the Arduino sketch
Wireframing our Android application
Implementing our layouts into the code
Polishing the user interface and experience
Adding a new app icon
Centering and enlarging the data output text
Aligning and styling the buttons
Changing the application name within the action bar
How to go further
Summary
5. Wi-Fi Remote Security Camera
Hardware and software requirements
Hardware configuration
Setting up video streaming
Implementing a fullscreen stream player on Android
How to go further
Summary
6. Android Phone Sensor
Hardware and software requirements
Configuring the hardware
Testing the servo
Writing the Arduino sketch
Setting up the Android app project
Laying out the Android user interface and permissions
Setting up the app's internals
How to go further
Summary
7. Voice-activated Arduino
Hardware and software requirements
Configuring the hardware
Writing the Arduino sketch
Setting up the Android app
Laying out the Android user interface and permissions
Coding the app's internals
How to go further
Summary
8. Control an Arduino Board via NFC
Hardware and software requirements
Configuring the hardware
Testing the NFC shield
Writing the Arduino sketch
Setting up the Android app
Laying out the Android user interface and permissions
Coding the app's internals
How to go further
Summary
9. Bluetooth Low Energy Mobile Robot
Hardware and software requirements
Configuring the hardware
Testing the robot
Writing the Arduino sketch
Setting up the Android app
Laying out the Android user interface and setting permissions
Coding the app's internals
Enhancing the user interface further
Adding a new app icon
Styling the user interface buttons
How to go further
Summary
10. Pulse Rate Sensor
Hardware and software requirements
Configuring our hardware
Testing the sensor
Writing the Arduino sketch
Setting up the Android app
Laying out the Android user interface and setting permissions
Coding the app's internals
How to go further
Summary
Index
Arduino Android Blueprints
Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: December 2014
Production reference: 1151214
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-038-9
www.packtpub.com
Authors
Marco Schwartz
Stefan Buttigieg
Reviewers
Simone Bianchi
Kyrre Havik Eriksen
Adam Laskowitz
Rufael Negash
Commissioning Editor
Nadeem N. Bagban
Acquisition Editor
Harsha Bharwani
Content Development Editor
Anand Singh
Technical Editor
Indrajit A. Das
Copy Editors
Janbal Dharmaraj
Vikrant Phadkay
Project Coordinator
Rashi Khivansara
Proofreaders
Martin Diver
Maria Gould
Samantha Lyon
Indexer
Hemangini Bari
Production Coordinator
Nitesh Thakur
Cover Work
Nitesh Thakur
Marco Schwartz is an electrical engineer, entrepreneur, and blogger. He has a Master's degree in Electrical Engineering and Computer Science from Supélec in France and a Master's degree in Micro Engineering from the EPFL in Switzerland.
He has more than 5 years of experience working in the domain of electrical engineering. His interests gravitate around electronics, home automation, the Arduino and...