iPad to Computer Comms
Wednesday, 28 November 2012 Category : Comms, Implementation, Phase Two 1
Further research into the game's communication systems led to the discovery of the OSC (Open Sound Control) protocol. This is often used instead of MIDI in electronic musical instruments to allow communication and control between different devices.
Much of the inspiration for this section of the project came from Pete-O's excellent work on OSC and the Arduino which can be found here.
For this project we used TouchOSC on the iPad, as there are two iPads available for use within the group (freeing up iPhones and iPod touches for possible camera use). This app costs £3, and includes a free interface designer for Windows. Using this designer, an application was developed to send robot control signals from the iPad, this interface can be seen below.
Once run, the app was configured with host IP address and port of the Processing application which is discussed later.
Processing is an IDE and language that builds on Java, but with a simpler graphics programming model. This is ideal for us, as it works very well alongside the Arduino development environment, which was developed on the same interface. This makes it relatively easy, and well documented online to get an Arduino talking to the Processing sketch. In addition, there is an OSC library available, allowing us to parse and process OSC messages received over a local network. The OSC library has been developed by Andreas Schlegel, and is available here.
Much of the inspiration for this section of the project came from Pete-O's excellent work on OSC and the Arduino which can be found here.
For this project we used TouchOSC on the iPad, as there are two iPads available for use within the group (freeing up iPhones and iPod touches for possible camera use). This app costs £3, and includes a free interface designer for Windows. Using this designer, an application was developed to send robot control signals from the iPad, this interface can be seen below.
iPad interface for control - note space at the top for future game messages |
Processing is an IDE and language that builds on Java, but with a simpler graphics programming model. This is ideal for us, as it works very well alongside the Arduino development environment, which was developed on the same interface. This makes it relatively easy, and well documented online to get an Arduino talking to the Processing sketch. In addition, there is an OSC library available, allowing us to parse and process OSC messages received over a local network. The OSC library has been developed by Andreas Schlegel, and is available here.