close menu
Bookswagon-24x7 online bookstore
close menu
My Account
Professional Android Open Accessory Programming with Arduino

Professional Android Open Accessory Programming with Arduino

          
5
4
3
2
1

Out of Stock


Premium quality
Premium quality
Bookswagon upholds the quality by delivering untarnished books. Quality, services and satisfaction are everything for us!
Easy Return
Easy return
Not satisfied with this product! Keep it in original condition and packaging to avail easy return policy.
Certified product
Certified product
First impression is the last impression! Address the book’s certification page, ISBN, publisher’s name, copyright page and print quality.
Secure Checkout
Secure checkout
Security at its finest! Login, browse, purchase and pay, every step is safe and secured.
Money back guarantee
Money-back guarantee:
It’s all about customers! For any kind of bad experience with the product, get your actual amount back after returning the product.
On time delivery
On-time delivery
At your doorstep on time! Get this book delivered without any delay.
Notify me when this book is in stock
Add to Wishlist

About the Book

Learn how to control your home or car from your Android smartphone - air conditioning, lights, entertainment systems, and more!

Android Open Accessory is a new, simple, and secure protocol for connecting any microcontroller-empowered device to an Android smartphone or tablet. This Wrox guide shows Android programmers how to use AOA with Arduino, the microcontroller platform, to control such systems as lighting, air conditioning, and entertainment systems from Android devices. Furthermore, it teaches the circuit-building skills needed to create games and practical products that also take advantage of Android technology.

  • Introduces Android Open Accessory and shows how to set up the hardware and development environment
  • Explains how to code both Android and Arduino elements of an accessory
  • Features four complete projects developers can build using various sensors and indicators/actuators, including source code
  • Gives Android developers the tools to create powerful, sophisticated projects

Professional Android Open Accessory with Android ADK and Arduino opens exciting new opportunities for Android developers.



Table of Contents:

INTRODUCTION xxi

PART I: WELCOME TO THE WONDERFUL WORLD OF ACCESSORIES

CHAPTER 1: INTRODUCTION TO ANDROID OPEN ACCESSORY 3

I, Android 3

The Three Laws of Android 4

The Android Philosophy 6

Other Popular Systems 7

Preinstalled Applications 8

What Is Android Open Accessory? 9

Android USB in Short 9

Developing Android Accessories 10

What Is Arduino? 10

How Does AOA Work with Arduino? 11

What Can You Do with AOA? 12

What Can’t You Do with AOA? 13

Why it Matters that Google Chose Arduino 14

Summary 15

CHAPTER 2: SETTING UP THE (ARDUINO) HARDWARE 17

Choosing Microcontroller Boards for Your Project 18

One Platform, Many Architectures 18

Shields 26

Choosing Sensors and Actuators for Your Project 29

Sensors 30

Actuators 34

Powering up Your Project 38

Ways to Power up Your Project 38

Arduino Feeding Your Phone 41

Summary 41

CHAPTER 3: UNDERSTANDING DATA COMMUNICATION 43

Data Communication Basics 43

Protocols 44

Terminology 45

Hardware Layer for the Communication Protocol 47

ADB 47

Accessory Mode 48

Host Mode 48

TCP/IP 50

Audio Port 52

Bluetooth Options 53

Introducing MQTT 54

Heads Up! 55

MQTT Messages 58

P2PMQTT: A Modifi ed MQTT 63

Establishing a Connection 63

Subscribing to a Topic 63

Publishing a Message 64

Disconnecting 64

Summary 64

CHAPTER 4: SETTING UP DEVELOPMENT ENVIRONMENTS 67

Setting up Android Development 67

Android Development Environment 69

Hello, Android! 79

Setting up Arduino Development 80

Arduino Development Environment 80

Hello, Arduino! 82

Hello Open Accessory App 85

The Temperature Sensor 85

The Arduino Sketch 87

The Android Project 88

Ready to Go 88

Summary 89

CHAPTER 5: CREATING THE ACCESSORY LIBRARY 91

Getting Started with Android Libraries 92

Building the P2PMQTT Library 92

Preparing the Library Project 92

Sketching the API 93

Implementing MQTT 94

Decoding MQTT 108

Managing Open Accessory Connections 117

Creating the Connection Class 117

USB Connection 119

Bluetooth Connection 123

Creating the Connection 126

Summary 131

CHAPTER 6: USING YOUR ACCESSORY LIBRARY 133

Using Custom Android Libraries 133

The WroxAccessories Library 134

Building the Mini Projects 137

The LSMSD 137

The Parking Assistant 145

The Basic Robot 154

The Sampler 164

Summary 170

CHAPTER 7: DIGITAL ARDUINO 171

Digital Actuators 172

The Blinking LEDs 172

Controlling a Desk Lamp — The Relay 178

Digital Project 1: Large SMS Display 182

Writing the Arduino Program 186

Digital Sensors 190

Buttons and Switches 190

Tilt Sensor 194

Digital Project 2: Small Sampler 197

Summary 202

CHAPTER 8: ANALOG ARDUINO 205

Analog Actuators 206

The Piezo Element 207

Motors 211

Analog Project 1: The Basic Robot 215

Analog Sensors 223

Potentiometers 224

Ultrasound Sensors 228

Analog Project 2: The Parking Assistant 233

Summary 239

PART II: PROJECTS

CHAPTER 9: BIKE RIDE RECORDER 243

The Concept Behind Bike Computers 244

The Design Brief 245

Working with the Arduino Side 246

Creating the Hardware and Mechanics 247

Programming the Bike Computer 251

Building the Android App 259

Creating the Bike Ride Recorder Project 260

Creating the User Interface 261

Setting up the AoaService 266

Building the Main Menu Activity 271

Building the Recording Activity 271

Building the List Recordings View 282

Building the Playback View Activity 285

Making Further Improvements 290

Mechanics 290

More Sensors 290

Making a Better App 290

Summary 291

CHAPTER 10: KITCHEN LAMP 293

The Concept 293

The Design Brief 295

The Arduino Side 296

Hardware 298

Software 301

Building The Android App 307

Sketching the Application Layout 307

Create the Kitchen Lamp Project 308

Create the User Interface 308

Building the Kitchen Timer 313

Responding to Phone Calls 315

Listen for SMS Events 319

Connecting to the WroxAccessory 322

Further Improvements 325

Product-ready Embedded System 326

Making a Better App 326

Summary 327

CHAPTER 11: MR. WILEY 329

The Concept 330

The Design Brief 331

The Arduino Side 332

The Hardware 332

The Firmware (on the Robot Board) 335

Creating Software for the Mega ADK Board 340

Building the Android App 342

Sketching the Application Layout 343

Creating the Mr. Wiley Project 343

Building the Computer Vision Algorithm 348

Connecting to the WroxAccessory 358

Making Further Improvements 364

Electronics 364

Making a Better App 364

Summary 364

INDEX 365


Best Seller

| | See All

Product Details
  • ISBN-13: 9781118454770
  • Publisher: John Wiley & Sons Inc
  • Publisher Imprint: Wrox Press
  • Language: English
  • ISBN-10: 1118454774
  • Publisher Date: 21 Dec 2012
  • Binding: Digital (delivered electronically)
  • No of Pages: 408


Similar Products

How would you rate your experience shopping for books on Bookswagon?

Add Photo
Add Photo

Customer Reviews

REVIEWS           
Be The First to Review
Professional Android Open Accessory Programming with Arduino
John Wiley & Sons Inc -
Professional Android Open Accessory Programming with Arduino
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Professional Android Open Accessory Programming with Arduino

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book
    Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    | | See All


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!
    ASK VIDYA