Author Archives: rvmiller89

Caterpillar iPhone App

shapeimage_1I was hired to add functionality to an existing iPhone app for Caterpillar’s tree harvesting service. The goal is to give Caterpillar the ability to track and record data about their equipment during use.

Data is stored in an Entity model using SQL Lite and the iPhone’s Core Data framework. The app follows a walk-through model, where a user proceeds to add data to a “study” (represented by an entity in the database) and record measurements for that study. The user can also view a history of all studies on the device.

01_1 cat_new_1

MultiType Eclipse Plugin


As part of this team project for my CS 307 software engineering course, we developed a collaborative editor plug-in for the Eclipse environment. Users are able to share source code files with other users, who can view changes made to a document by other users in real-time, and make their own viewable modifications.

The plug-in integrates seamlessly with the Eclipse IDE, and features an independent server that can be run on any port-forwarded connection. Future versions will support additional editors, with more customizable features.

Update (5/7/11)

Test-drive the plug-in and browse the source code at our project homepage, hosted on Google Code here.

Arduino-controlled Robotic Arm with Android Interface


Project hosted on Google Code [LINK].

Continuing my trend of Arduino projects, I decided to toy around with this robotic arm I got for Christmas. The arm is not the best construction, using DC motors instead of servos, but with Adafruit’s motor/stepper/servo shield kit, I think I can make it somewhat more useful.

First to go is the flimsy plastic controller. The motor shield allows up to four of the of five motor joints to be controlled with the Arduino. I want to use this opportunity to explore the Java serial libraries to communicate with the Arduino over the Internet in a Java applet *or* purchase an Arduino ethernet shield and send commands directly to the device (see below)

I suppose, as an overall goal, I would like to be able to feed my fish while away with the use of a webcam and this robotic arm.

Completed Robotic Arm connection to motor

IMAG0138_1 IMAG0135_1

This setup allows control of the maximum of four motors.  I’d rather have everything integrated into one cable, but the supplied cable didn’t have enough pins to handle 4 motors and power and ground.  That’s why I added the red/black leads shown above v.  Here’s how everything looks hooked up to the freshly soldered motor shield:



Right now the Arduino is powered by USB, and the motors are powered by the arm’s original DC power source — 4 D batteries. This can easily be changed to have the arm run off of a DC adapter.

Next up: Due to the number of pins that the motor shield requires, I won’t be able to use an ethernet shield with this project. So, Java-based serial communication it is!

Update 4/16/11

I wrote a Java application with SWT to handle the serial communication with the Arduino’s motor controller. Essentially, it relays messages over the serial line about what motor to enable. The “speed” of the motor is an illusion by using a custom TimerTask to repeatedly send requests to enable the motor (every 10ms) and then sleep the thread for a duration between each task interval, until the button is no longer pressed. This solution makes the robotic arm much more useful as it can now make very controlled movements (<1mm).

Here is a screen shot of the user interface:



Update 9/7/12

I’ve started working on this project again! I decided to clean up some of the code and create an Android app that can control the arm wirelessly (as long as it’s connected to a host PC).


Project hosted on Google Code [LINK].

Arduino OBD-II Interface


For my CS 497 Spring 2011 course, I worked on an independent study project creating an Arduino-based OBD-II (vehicle onboard diagnostic) interface written in C.

First, I assembled an interface between an Arduino Uno and the ISO9141 bus that most vehicles prior to 2008 use. An open-source project called OBDuino describes how to assemble such an interface, available here. Second, I wrote software for the Arduino to poll information from the vehicle’s engine control unit (ECU), such as instantaneous information like RPM and vehicle speed, and also diagnostic feedback, and display it in real time on an attached LCD screen. Third, I added an Arduino data-logging shield to allow the capturing of long-term data from a vehicle in a spreadsheet-ready format.

Download the presentation I gave on this project.

Download the source code used for this project.

Update – 3/27/11

Since my last progress update, I have written software for the Arduino to:

  • Interface with my automobile’s ISO-9141 bus, and
  • Begin polling for parameter IDs (PIDs)

Before the Arduino can begin polling data from the automobile’s ECU, it must first establish a serial connection. The initialization sequence was adapted from ISO standard 9141-2:1994, available at the Engineering library. Once started, it sends address 0x33 to the ECU at 5-baud to “bit-bang” the ECU and establish a serial connection. The Arduino then switches into normal serial communication at 10.4kbps and waits for a return address of 0x55 from the ECU followed by two keywords. The Arduino sends back the inverse of the second keyword and, upon a response of 0xCC (the inverse of 0x33) from the ECU, the Arduino displays “Init. Success!” on its LCD screen. Initialization usually takes a few seconds to complete, and the connection must be re-initialized if the ECU is not polled for data within 5 seconds.

Screen shot 2011-03-27 at 11.12.07 PM


Displayed on the LCD screen above are instantaneous readings from the four PIDs currently polled by the Arduino. Clockwise from the top-left corner, these include:

  • Engine RPM
  • Vehicle speed
  • Mass airflow (MAF) sensor, which can be used to calculate instantaneous MPG
  • Engine coolant temperature

Values update every 200ms on the LCD. Polling for PIDs involves sending a byte-encoded message to the ECU requesting a value for a PID defined in the SAE J1979 standard. The ECU then responds with a byte-encoded value that the Arduino can decode and extract information from to display on screen. Currently, the system only polls for these four PIDs, but will be expanded to poll for several more.

Upcoming Tasks

In addition to adding more PIDs to poll, I will mainly be focusing on implementing a data logger shield to hold data captured by the Arduino and display in spreadsheet form on a computer.

The data logger shield sits on top of the Arduino unit, and uses pins not used by the LCD or serial communication. The shield also contains a real-time clock to add a timestamp next to data read from the ECU. Data is stored on a 2GB SD card.



The ability to log large amounts of data from a vehicle demonstrates the usefulness for this system to offer diagnostic capabilities with a high degree of precision and temporal resolution. Implementing and programming this data logger shield, as well as graphically displaying spreadsheet data, should consume the remainder of the time allotted for myproject.

Update – 4/12/11

I’ve added the data logging shield and a way to compute MPG from the MAF (mass air flow) and VSS (vehicle speed sensor) PIDs.

MPG = VSS * ( 1 / (MAF * .0889))

Here are some Excel graphs plotted from data over a 20 minute period (844 data points). Click for larger graphs.



CityBus iPhone App


CityBus iPhone is currently in development as part of a Purdue ACM SigApp application. As of now we have a tab-based interface with one tab displaying a MapKit UI with route overlays and the other tab with a UITableView representing the route selections. Certain stops can also be turned ‘on’ via annotations. Touching a bus stop annotation opens a UIWebView to display live data from the CityBus website on a certain stop visit collectiveray.

The latest version requires iOS 4.0+ and uses the latest API for MKPolylines to draw overlays on the map.

Visit the project page here.

Java-based Map Editor and Map Viewer

This team project consisted of two parts, both built with a Java GUI. The first half, the map editor, allows a user to mark locations and paths on an image to create an overlay graph data structure. The user can also name locations and export the saved data structure as an XML file.

The second half, the map viewer, loads the map image and XML file and uses an implementation of Djikstra’s algorithm to allow the user to find the shortest path between two selected points on the map. The map viewer also outputs the steps along the path, and adds the step costs using a scale factor to calculate the total distance of the path.

You can download a zip file containing the JAR files for MapEditor and MapViewer, along with the Purdue map image and sample XML dataset:

Run the application via:

java -jar MapEditor.jar
java -jar MapViewer.jar

8086-Emulated X86 Assembly Scroller

This project consisted of building an x86 assembly program in an 8086-emulated environment.  We used the FreeDOS operating system with a set memory of 16 megabytes.  We used Q and Qemu to emulate the architecture.


The user enters the executable name “marquee” followed by a string of characters that the program will scroll across the 80 column screen, vertically centered within a blue double-line border.  Execution stops when the user hits Escape.


Download the MARQUEE.ASM source file.

Webcrawler and Search Engine

Screen shot 2010-10-26 at 1.22.52 AM_1

We first designed a webcrawler in C++ using a provided HTTP interface to “crawl” a list of initial URLs to a maximum depth. Along with archiving URLs, the crawler stored the textual words on a webpage for searching purposes and a 100-word description of every page.

Next, we designed a search engine that preprocessed the results of the webcrawler to store data in one of three data structures:

• Array
• Hash Table
• AVL Dictionary
• Binary Search Dictionary

We used an HTTP server provided to format HTML pages to display results of queries, as well as display search times to compare the different data structures’ efficiency. We called the search engine Boogle, as a combination of “Boilermaker” (Purdue Boilermakers) and Google.