Keiichi Onishi

MAS.863 How to Make (Almost) Anything

Interface and Application Programming

This week's assignment was "write an application that interfaces with an input &/or output device"

Overall progress

This week I made additional progress towards final project, which is writing an Android App that can control LED light on a circuit board I made last week with bluetooth device, HC-05. Following Google's Android tutorial with using Android Studio (Not Eclipse), I managed to write simple one. Although It was a bit time consuming process as a biginner of Android App developer, I'm getting more familiar with creating ones.

  • What: Android App: LED controller
  • Components: hello.bluetooth_m.44 board; HC-05 module; Android phone (version 2.3.3)
  • Design tool: Android Studio; Arduino IDE

Application 02
Step 1: Programming Attiny 44 with Ardino IDE

The App's function is sending signals from Android phone to turn LED light ON and OFF. What I need to do in microcontoller side are 1) setting up bluetooth serial communication and 2) defining input and output pins assignment.

Here is my source code

Application 03
Step 2: Programming Android App: SimpleBluetooth

Here is an exciting part, Android App development! First, you download and install Android Studio following instruction. The process is pretty straightforward if you follow the instruction. It's currently in beta but will be the official Android IDE once it's ready. As the ADT plugin for Eclipse is no longer in active development, using Android Studio would be better option if you are new to Android development. As for bluetooth communication, this tutorial provided by Google is quite useful. You can refer some sample codes on the website as well.

Here is my source code

AndroidManifest.xml

DeviceListActivity.java

MainActivity.java

activity_main.xml

device_list.xml

device_name.xml

Application 01

Step 3: Final product

After struggling debugging both Arduino and Android, I successufuly controlled LED on my circuit board from my phone.