Home > Android-Open-Presentation-notes

Android-Open-Presentation-notes

Android-Open-Presentation-notes is a project mainly written in ..., it's free.

== Slide 1 Introductions

== Slide 2 Give them the URL to download the slides. Encourage them to do so.

== Slide 3 Describe the Android hardware options:

USB/Open Accessory/ADK:: The microcontroller, such as an Arduino, plays host to—and powers—the phone. Most widely supported. USB Host is not widely available, but opens up a whole lot of possibilities (and shouldn't require the device to power the phone).

  • USB: the interface. Android is the peripheral, Arduino is the host. hence all the extra hardware on the board (and you're paying for a top-notch voltage regulator to keep the Arduino from overheating)
  • ADK: The Android Open Accessory Development Kit: Android APIs + a special Arduino board + Arduino libraries NFC/RFID:: Can read and write MiFare RFID tags. 1k, 4k, 16k storage is common. I've got a bunch of tags. You can each have one or two. Can also exchange messages between devices, and can emulate a tag. Bluetooth:: Possibly the most flexible way to talk from something like Arduino to an Android phone (unlike the ADK, it's untethered). Very easy, too—it's just a serial connection. That's outside the scope of this presentation, but come see us in the Make booth for more info. Blinkenlights:: serial over light. You program it over light sensors IOIO board:: from SparkFun Electronics and Ytai Ben-Tsvi. Similar to (and predates) USB and Open Accessory.

We'll demo each of these in a moment.

== Slide 4 What we'll teach you in this session:

The basics of Android development:: real quick hello world type intro because a few of you don't have Android dev experience. The basics of Arduino development:: A lot of you haven't done this before, and we'll take this a little slower footnote::[be sure you do!] Making Stuff with the ADK:: How to bridge the world of Arduino and Android. Sense and manipulate the physical world with your phone.

== Slide 5 What you already need to know: the usual. elementary programming skills for Arduino, more hardcore OO programming for Android. Let's move on to the demos. We'll get into the code later.

== Slide 6

What we'll do with the ADK. Two key things:

Control the Arduino with the Android phone:: turn on an LED footnote::[update this with Tyler's details]. Same principle applies to motor and many other actuators. Make the phone respond to the real world:: Android phones have a lot of sensors. Arduino can connect them to a lot more.

== Slide 7 Demo video: show off Tyler's project. Walk through the key bits:

  • Android app
  • Arduino connections
  • Sensors and actuators
  • Power supply making it work well

== Slide 8 What we'll demonstrate with NFC:

  • Write something to a tag
  • Read something from a tag
  • Also mention: Sending data between two phones Emulating a tag

== Slide 9 Demo video: show off NFC/RFID bits. Explain what happens at each point:

  • Writing data to a tag
  • Reading data from a tag
  • Different types of tags

== Slide 10 Overview of the other options:

  • Bluetooth control
  • Blinkenlights
  • IOIO

== Slide 11 Demo video: show off robot. Explain the following:

  • Pairing
  • Selection of device
  • Connection/disconnection
  • Explain the Arduino Pro Mini
  • How Arduino talks to the motors
  • How Arduino talks to Bluetooth
  • Where to buy the Bluetooth module
  • What you do in Bluetooth handler, how you update the robot's speed

== Slide 12 Demo video: programming the Wayne and Layne LED grid. What just happened?

  • PIC microcontroller has a mode in which you can load strings over the LEDs
  • LEDs are light sensors as well as emitters
  • It's basically a serial protocol (clock+data)

== Slide 13 Overview of what you need to do some of this stuff

  • Android 2.3.4 or later for ADK ** Nexus S is good for NFC at the moment.
  • Arduino Mega ADK
  • Arduino Uno or similar
  • All kinds of sensors and actuators. An LED and a pushbutton are a good start.
  • RFID module for Arduino

Let's not turn these next few slides into a sales pitch!

== Slide 14 Nexus S

== Slide 15 Mega ADK

== Slide 16 Uno

== Slide 17 Components

== Slide 18 RFID module + breakout board

== Slide 19 Overview of the five projects in this session:

  • The hello, world of Arduino: blinking an LED
  • The basic Android Hello, World. If you know this stuff, feel free to take a break.
  • Communicating from Arduino to Android and vice-versa
  • Reading and writing an RFID tag from Android
  • Creating a tag reader with Arduino and Processing (Processing is running on a computer)

== Slide 20 Which Arduino version? 0022 is the latest beta, and the most stable. 1.0 is in release candidate, and a lot of third party libraries haven't been updated yet. We'll use 0022

== Slide 21 Project 1: let's blink an LED.

== Slide 22 Required components:

  • An Arduino Uno, but any Arduino compatible, including the Mega ADK, is fine.
  • A USB A-B cable—the one you got with every printer you've ever bought
  • A computer (to program the Arduino)
  • The Arduino software

== Slide 23

Download the Arduino software

== Slide 24

Install Arduino:

  • On the Mac, drag the app to /Applications
  • On Windows/Linux, put it where you want it.
  • You don't need to install the driver package unless your Arduino is older than the Uno.
  • You will need to locate an .inf file in the Arduino\ directory on Windows when you plug the Arduino in for the first time.

== Slide 25

Wire it all up: this part is easy!

== Slide 26 A photo for good measure

== Slide 27 Run a sketch on the Arduino.

If you have trouble figuring out which serial port corresponds to your Arduino, look at Tools->Serial Port without the Arduino plugged in. Plug it in and look at it again. The one that wasn't there before is your Arduino.

== Slide 28 Let's look at the code. Arduino is simple: setup() is called once. loop() is called over and over again; until you unplug the Arduino, the world ends, etc.

== Slide 29

Now we'll quickly cover the basics of Android programming

== Slide 30

These steps are pretty straightforward. The only one that's slightly tricky is the last one: which Android SDK should you install? For NFC, you'll need the Android 2.3 SDK. For the ADK+open accessory, you'll need 2.3.3 (level 10) plus the Google APIs API Level 10 add-on library.

== Slide 31 This is everything you need to run this demo. You will need several more things for the ADK examples, including Google APIs API Level 10 add-on library. You can do that one now or wait until later. We're going to wait until later.

== Slide 32: Create an App This is going to be old hat for most of you. Well, at least for the most of you who replied to the survey we sent out to registered participants a few weeks ago.

== Slide 33 This is what your new project properties should look like

== Slide 34 And this is what your app will look like. Hey, let's actually fire the app up with Jens Riboe's http://blog.ribomation.com/droid-at-screen/ to show it.

== Slide 35 Let's look at the source of the TestAppActivity

== Slide 36 // wait until Tyler's slides are done to resume these

Previous:xOxOx