PC running Windows XP or newer.
A Wi-Fi connection to your PC.
An iPod Touch or iPhone. I used a iPod Touch 4G.
Step 1: Install Control From ITunes
Step 2: Run the App
Tap “+” to add the OnOff control. Enter the URL:
Note the last entry on the “Interfaces” screen is now “OnOff”. I've found it is hard to navigate to new menu items. If you have trouble, simply stop Control and restart it.
Step 3: Run the PC Host Program
Extract the onoff.exe file from the zip and run it. Click the Start button. The program will tell you the IP of your PC.
On your iPod Touch, select “Destinations” from the menu. Tap “+” and enter your PC's IP in the “Enter Destination URL” (just the IP, no “http://”). Enter 10000 as the port number, then tap “Add”. Your IP address and port will appear in the list. Select it and it will turn grey.
Select “Preferences” from the iPod Touch menu. Enter 10000 for the OSC Receive Port.
Your iPod Touch is now ready to communicate to your PC.
NOTE: Every time you start Control, you will have to select your URL from the “Destinations” screen.
Step 4: Run the IPod Control Screen
At this point, you are now communicating in both directions. The iPod Touch sent the value of the ON command as 127. The PC received the datagram, detected the originating IP, and begins updating the iPod Touch at 2Hz with the current value.
Press the OFF button on the iPod and it will change the state on the PC and on the iPod Touch.
Click the radio button on the PC’s dialog box and the iPod Touch buttons will change state.
The loop on the PC runs at 500ms, so don’t be harsh about the update speed.
Step 5: Bonus Step: Control Something
The relay I used is a Crydom D1240, which I had in my junk pile. I see they are available from Digi-Key for about $40 US.
If you don't have anything like this, then try turning on and off a LED.
Step 6: What Next?
Use a text editor (notepad or write) to experiment. Be sure to have the documentation for the widgets open in a browser window for reference. http://charlie-roberts.com/Control/?cat=4
The zip file you downloaded contains the C++ code (Visual Studio 6) for OnOff.
The zip file also contains JSON and C++ programs for analog controls using a slider. There is also a LabView 2009 implementation of OnOff .
The communications between Control and the host uses the OSC (Open Sound Control) protocol. For more information on the message formats, see http://opensoundcontrol.org/spec-1_0