Blog Archives

TouchOSC Arduino Tutorial

I’ve added a little Tutorial that describes in detail how to send and receive OSC (Open Sound Control) messages with an Arduino Sketch

There are a number of tutorials and resources on the Internet that show how to do this this but the one’s I found leave to be desired in one or the other area.

  1. This tutorial does not require a “middle man” e.g. a PC or other computer to receive and interpret OSC messages via Processing and then send commands to the remote device. The Arduino exchanges OSC messages directly with the device to be remotely controlled.
  2. Some tutorials use old and non-maintained Arduino OSC libraries such as ArdOSC or zOSC. This tutorial uses the Oscuino library, which is written and actively maitained by the inventors o the OSC protocol at CNMAT Center for New Music & Audio technology

A feature of TouchOSC that AFAIK only works on iOS devices is that it can recognize devices that have registered an OSC service on the local network by using Apples implementation of ZeroConf networking called Bonjour. In a  next tutorial I will show how to accomplish that using the Arduino Bonjour library.

The most reliable hardware combination I’ve found to do this with is a Teensy 3.0 (or 3.1) connected to a WIZ820io embedded Ethernet module that is connected to a Pocket WiFi Router such as the TP-Link TL WR702n (Or 703n). While this is certainly more bulky than a solution that employs one of the available WiFi modules such as the TI CC3000 it has a few significant advantages.

  1. The TP Link WiFi router comes out-of-the-box in AP (Access Point) mode and that makes it very easy to connect to the Microcontroller directly without having to integrate it into an existing TCP/IP network. Great for debugging communications! I am not currenty aware of any  of the IoT WiFi modules that can work as an AP.
  2. Once a project is debugged and UDP packages and OSC messages are exchanged the router can be connected to an existing network an this is quickly done through an easy to use web interface.
  3. The WIZ820io uses a Wiznet W5200 Ethernet Chip that also supports Multicast DNS. That is a prerequisite for Bonjour to work. I’ve not been able to find an embedded WiFi module that fully supports this. The very new Texas Instruments CC3100 may be the first one. I believe it when I see it.

However, when Bonjour functionality is not required, then this may actually work fine on a SparkCore. The above suggested hardware does work – including Bonjour – as I use it successfully in my LED Lighting Systems