Here’s a project from SuLuLab using an Android smartphone to send commands via WiFi to an Arduino board in order to control a MIDI sequencer. It uses the new Processing 1.5 which provides Android support.
The first application developed to study the new Processing mode is a graphical interface for the simple MIDI Sequencer, for an Android smartphone. This application creates a grid of 8×8 squares on the smartphone screen that become sensitive areas to set up (with a tap) and display (changing the colours) the notes to play in 8 steps. The state change of the squares in the grid is sent to Arduino (equipped with an Ethernet Shield and a MIDI Shield) by OSC messages.
Arduino receives OSC messages by the network, changes its internal representation of the state of the grid, sends notes to play to the MIDI interface and sends OSC messages to the smartphone to synchronize the time step in which the note is played with the squares on the screen.