A threaded server in Java for the Android platform

In this post we will create a basic concurrent server using threads in Java. The server will be implemented for the Android platform as part of a larger project to control a USB interface board remotely. Below are two screen captures. The first shows a state of the server after a few clients have connected and sent data. The second shows the terminals for the four clients. We will first take a look at our user interface. The main.xml file is given below. We have two buttons for starting Read more [...]

A keyboard handler and timer in C++ for the Linux platform

In this post we will construct a simple timer for evaluating the duration of a frame in addition to a keyboard handler. We will use these objects in conjunction to update our position relative to a cube. SDL and OpenGL will be used for rendering. Below is a frame captured from our application. We will query an instance of our timer once for each pass through our application loop. It should yield the duration of the previous frame. The position of objects in the current frame can then Read more [...]

A Linux C++ joystick object

In this post we will implement an object in C++ for accessing the state of an attached joystick. Below is a rendering using SDL and OpenGL of a joystick state. In "/usr/include/linux/joystick.h" we find the following event structure: Once we have opened a device node for reading we will populate this event structure with the data read from the device. We define a structure for holding the state of the joystick. As we parse the event data, the joystick state structure is updated Read more [...]

Adding preliminary TUIO support for multi-touch systems (parsing OSC packets for 2D cursor descriptions)

In this post we will begin to add TUIO (Tangible User Interface Object) support to our project by implementing a server module to parse OSC (Open Sound Control) packets for 2D cursor descriptions. This will allow us to import blob events from a client application. We will use the TUIOdroid application available for android devices to send UDP packets to our server module. The server module will parse these events, and our trackers will import the blob events. This post is intended to provide Read more [...]