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

About trippylighting

Mechatronics Engineer

Posted on October 12, 2014, in Uncategorized and tagged , , , , , . Bookmark the permalink. 1 Comment.

  1. marc_is_curious

    Thanks a lot for your very helpful tutorial!

    I hope that you may find a spare second to help me with my inquiry as listed below:

    _____________________________________________________
    Wifi Connected (No Desk- or Laptop involved):
    Control “Adafruit huzzah esp8266” via TouchOSC (on Mobile)?

    – Can an “Adafruit huzzah esp8266” module work with your “TouchOSC Arduino Tutorial”‘s Arduino code?
    (Do I need to modify your code for a Wifi setup)?

    – Does wiring work like on this picture: “wiring_Huzzah_esp8266.jpg” *?

    *
    https://drive.google.com/file/d/1akzXGJmOveEXp1gY-F2nnWFkEQFxGYmI/view?usp=sharing
    _____________________________________________________

    & look forward to hearing from you;

    Best regards,
    Marc

Leave a comment