"Hardtop" Arduino Communication Protocol

As part of a recent project, I built this library to connect the Arduino to an HP TouchPad. Rather than use a USB host shield (a popular way to connect an Arduino to an Android device) the two are connected using the headset jack on the TouchPad. The only hardware needed for it is the physical connector and two resistors for level shifting.

I thought it was quite an elegant solution for those situations where you might want to use a tablet display to present simple sensor data.

Because there is no shield needed, or even serial/FTDI connection, it is perfect for use with Ardweeny, or Arduino Mini-based projects.

The Tablet code is all generic Linux userspace code (in C), it only depends on ALSA, pthreads, sockets. I've built the code for ARM and x86.

Additionally, the library interfaces to applications by presenting an HTTP service available to 'localhost'. It serves up the sensor information via JSON messages and is even designed to serve-up HTML pages and related assets (images, stylesheets, etc.). As a result, applications that use data from the Arduino can be written using JavaScript and HTML in the browser. There is no need for application development to be in C and simple, graphical "webapps" are an easy alternative.