ebook img

Android Hardware Interfacing with the BeagleBone Black PDF

230 Pages·2015·2.21 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Android Hardware Interfacing with the BeagleBone Black

Android for the BeagleBone Black Table of Contents Android for the BeagleBone Black 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 Errata Piracy Questions 1. Introduction to Android and the BeagleBone Black Looking back on Android and BeagleBone Black development Shopping for the hardware essentials The FTDI cable Power supply Breadboard and the mounting plate MicroSD cards Learning about the hardware you'll interface with General-purpose components The AdaFruit memory breakout board The AdaFruit sensor breakout board Preparing the breakout boards Installing Android on the BeagleBone Black Downloading a premade Android image Creating your Android microSD card using Windows Creating your Android microSD card using Linux Summary 2. Interfacing with Android Understanding the Android HAL Android managers The HAL development workflow Working with PacktHAL Installing PacktHAL Preparing PacktHAL under Linux Preparing PacktHAL under Windows The PacktHAL directory structure Preparing Android for PacktHAL Pushing PacktHAL files under Linux Pushing PacktHAL files under Windows Setting up the Android NDK for PacktHAL Adding the header to the NDK under Linux Adding the header to the NDK under Windows Multiplexing the BBB pins The kernel Device Tree and capemgr Defining a cape Summary 3. Handling Inputs and Outputs with GPIOs Understanding GPIOs Nuts and bolts of GPIO GPIO access methods under Android Pros and cons of the file I/O method Pros and cons of the memory-mapping method Preparing Android for GPIO use Building a GPIO-interfacing circuit Constructing the circuit Checking your wiring Including PacktHAL within your apps Understanding the Java Native Interface Creating a new app project that uses PacktHAL Building PacktHAL under Windows Building PacktHAL under Linux Exploring the GPIO example app Installing the app and source under Windows Installing the app and source under Linux The app's user interface Calling the PacktHAL functions Using the PacktHAL GPIO functions Summary 4. Storing and Retrieving Data with I2C Understanding I2C Devices that use I2C Multiplexing for I2C on the BBB Connecting to I2C via the P9 header Multiplexing for I2C Representing I2C devices in the Linux kernel Preparing Android for FRAM use Building an I2C-interfacing circuit Connecting the FRAM Checking the FRAM connection with I2C tools Exploring the I2C FRAM example app The app's user interface Calling the PacktHAL FRAM functions Understanding the AsyncTask class Learning the details of the HardwareTask class Summary 5. Interfacing with High-speed Sensors Using SPI Understanding SPI Multiplexing for SPI on the BBB Representing SPI devices in the Linux kernel Preparing Android for SPI sensor use Building an SPI interface circuit Connecting the sensor Exploring the SPI sensor example app The app's user interface Calling the PacktHAL sensor functions Using the HardwareTask class Summary 6. Creating a Complete Interfacing Solution Building the complete interface circuit Exploring the complete example app The app's user interface Understanding hardware polling in an app Using AsyncTask with long-lived threads Using the HardwareTask class Summary 7. Where to Go from Here Integrating your solution with Android Creating a custom kernel and Device Tree Adding hardware communication into the kernel Integrating into existing managers Creating new managers for custom hardware Combining your project with other hardware Constructing your own prototype capes Commercial capes that interface with Android Exploring the BBB's other interfaces Programmable real-time units Serial communications Controller area network The analog-to-digital converter Pulse width modulation Summary Index Android for the BeagleBone Black Android for the BeagleBone Black Copyright © 2015 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: February 2015 Production reference: 1130215 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78439-216-1 www.packtpub.com Credits Authors Andrew Henderson Aravind Prakash Reviewers Nathan Burles Guy Carpenter Anuj Deshpande Commissioning Editor Amarabha Banerjee Acquisition Editor Greg Wild Content Development Editor Neetu Ann Mathew Technical Editor Tanvi Bhatt Copy Editors Deepa Nambiar Vikrant Phadke Project Coordinator Mary Alex Proofreaders Simran Bhogal Bernadette Watkins Indexer Hemangini Bari Graphics Sheetal Aute Production Coordinator Manu Joseph Cover Work Manu Joseph

Description:
Design and implement Android apps that interface with your own custom hardware circuits and the BeagleBone Black About This BookDesign custom apps that interact with the outside world via BeagleBone BlackModify Android to recognize, configure, and communicate with sensors, LEDs, memory, and moreA st
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.