An Implemntation for Connecting Android Powered ...

3 downloads 85421 Views 277KB Size Report
Keywords-Android cell phone; Android IOIO; Style box;. I. INTRODUCTION. Android [1] is Google's open-source platform, which is recently enjoying wide ...
An Implemntation for Connecting Android Powered Device to External World Hui-Kang Teng

Cheng-Min Lin

Dept of Computer and Commu Engr Nan-Kai University of Technology, Taiwan, ROC [email protected]

Dept of Computer and Commu Engr Nan-Kai University of Technology, Taiwan, ROC [email protected]

Kuo-Chen Lang

Yi-Lun Chu

Dept of Computer and Commu Engr Nan-Kai University of Technology, Taiwan, ROC [email protected]

Graduate Inst of Elec Engr & Computer Sci Nan-Kai University of Technology, Taiwan, ROC

Shou-Jie Chen Graduate Inst of Elec Engr & Computer Sci Nan-Kai University of Technology, Taiwan, ROC

Abstract—An interface between Android cell phone and external world by taking the advantages of Android IOIO is demonstrated experimentally. The hardware and software is described in this report while the capability of human-machine interface is presented. Keywords-Android cell phone; Android IOIO; Style box;

I.

INTRODUCTION

Android [1] is Google’s open-source platform, which is recently enjoying wide adoption by industry and end users. Designed to be a complete software stack, Android includes an operating system, middleware, and core applications. It comes with SDK that provides necessary tools and APIs to develop new applications for the platform in Java. Android’s application model consists of several interesting features [2]. First, applications must be composed of some basic kinds of components understood by Android. This design encourages sharing of code and data across applications. Next, interactions between components can be controlled by Android, and other applications may access such components only if they have the required permissions to do so. The cell phone powered by Android is a powerful mobile platform with internet connection and a variety of built-in sensors (camera, GPS, IMU, touch screen). Such cell phones are also very easy to write applications via SDK developers. An effective way to use native code libraries is necessary when an I/O device is controlled by Android application [3]. Hence, for developers familiar with both languages, Java and C or C++, simultaneously is a difficult task. The only missing of Android supported cell phones is the connectivity to external world. This is what the Android IOIO [4] designed for. IOIO provides the capabilities of the cell phone with the ability to communicate with external activities. Since most of existing solutions that connect

Android cell phone to the outside world suffered from one or more of the factors, such as high cost, complicated, low bandwidth, large physical size or the replacement of the Android device OS is required. IOIO does not suffer from any of the above. Its cost is competitive with existing solutions, about 3ms one-way latency, maximum 300KB/sec throughput, small size and more important, it is able to work with existing OS. We demonstrate in this report a simple application by transmitting external position signal from a 3x3 optical style box to Android cell phone via IOIO device. The digital position signals are then translated by Android cell phone into a symbol “O” or “X” and shown at corresponding position on the screen. Such technique reveals the various possibilities for any kind of external activity as signal source which prompts Android cell phone as a listener and making responses as one’s wish, via Android IOIO. II.

SYSTEM DESCRIPTIONS

A. Interfacing by Android IOIO Android IOIO shown in Fig. 1 is an I/O circuit designed for working with Android device (OS versions 1.5 and greater). The board provides a connection to an Android device, which is an Android cell phone in this case, via a USB connection. The IOIO board can be fully controllable from within an Android application by using Java API. The IOIO board contains a single MCU that acts as a USB host and interprets commands from an Android application program. In addition, the IOIO is also able to interact with peripheral devices in the same way as most MCUs. Therefore, Digital I/O, PWM, Analog Input, I2C, SPI, and UART control can all be employed with the IOIO board. Figure 2 demonstrates a class hierarchical diagram for Android I/O model. The interface of Closeable is super interface. All I/O interfaces are a child interface of Closeable.

The code needed to control these interfaces is written in the same way as other Android applications. Moreover, the user is allow to combine the computing power, Internet/Bluetooth connectivity, touch screen, and a variety of sensors from Android devices with the ability to easily add peripheral devices to interact with the outside world. It should be noted that the IOIO board needs DC power through the VIN pin within 5V-15V from outside world. Android also supports a

Figure 1. Android IOIO board.

Figure 2. IOIO IO API class hierarchical diagram .

PIN Photodiode

Laser pointer

variety of USB peripherals and Android USB accessories through two modes: USB accessory and USB host. In USB accessory mode, the external USB hardware acts as the USB host, which gives Android-powered devices the ability to interact with USB hardware. In USB host mode, the Android-powered device acts as the host. USB devices are designed for a wide range of applications and environments so that they can interact with Android applications and communicate correctly with the device. B. External Optical Style Box The optical style box consists of 16 laser pointers, eight of them are aligned in equal spacing d along vertical y-axis so that the light beam of each pointer propagates horizontally in -x direction. Another eight pointers are also aligned in equal spacing d along horizontal x-axis, they emit light beams to -y direction. Such arrangement eventually constructs a 9x9 matrix as shown in Fig.3. Each of the light beams incidents on a PIN photodiode which is cascaded by a preamplifier. The outputs from eight preamplifiers that locate along x-axis are considered as one byte denoted by x-byte. The rest outputs locate along y-axis are considered as y-byte. Once the light beam from the laser pointer is on, corresponding output from preamplifier is “1”, otherwise, the corresponding output is “0”. A 8051 microcontroller reads xbyte and then y-byte and its output port is directed connected to Andriod IOIO. Actually, the 9x9 matrix is configured as an optical 3x3 style box, once a ball with diameter r where 2d

Suggest Documents