Project Updates for 3/23/2013

I ended up attaching an external LED, which worked great. After doing lots of reading and internet searching, I've finally come up with a solution that has everything working nicely. I found a very nice Android Library called usb-serial-for-android. This was written with the main purpose of communicating with the android. Additionally, this library includes drivers for communicating with many Arduino devices including FTDI based arduinos like my Diecimila, which will save me a lot of time. Although the documentation is sparse, I was able take the example program and intergrate it into my own program. I did need to write a custom decoding function based on the HexDump.dumpHexString() function source code.

I also needed to update the Arduino test program slightly as well as my method of connecting. The current procedure is to plug the arduino into the program while it is running, give it permission to access the USB device, then push the reset button on the arduino. When that's done, a "connected" command is returned to the android, which then starts sending commands to gather information.

Additionally, I was having trouble with my program locking up the android whenever it went to sleep. As soon as I started unregistering my Broadcast Reciever in onPause() and reregistering it in onResume(), that seemed to solve the problem.

These were some tough obstacles to overcome, but with basic communications functioning, it's time to start integrating this into the main program and gathering relevant information, which I'll start on soon.

Posted in Old Posts 23 Mar 2013