showcontrollerDownload the showcontroller project v0.8 Update, June 29, 2008: Linux users, see "one last note," near the bottom of the page, with editing instructions. I'll be modifying the source to auto detect mac or linux and choose the correct connection later (version 0.9...) showcontroller is an extension of the socketserver project and the arduino project. socketserver is my solution to getting applications and devices to talk to one another; one of the things I wanted to be able to talk to was the arduino board, as they are cheap, opensource, and very easy to program and connect hardware to. From the arduino homepage:
In the spirit of 'easy-to-use,' showcontroller attempts to make a generic input/output system that readily connects to Flash, Director, Processing, or any other TCP/IP-enabled content creation platform. At present, it has 6 digital input/outputs (can be used for input, output, or input/output simultaneously), 2 digital encoders (non-indexed), and 2 analog inputs. I've come up with a very, very compressed protocol for arduino to my client software (socketclient.sh, in the download), so every 30th of a second the client checks in with arduino and arduino lets the client know what's happened since they last chatted. The client also allows setting of outputs, because they would be useless without that functionality! Here's an overview of the protocol between your client software and the socketclient.sh program (from socketclient.sh comments, by the way...):
I'm versioning this as 0.8 instead of calling it good because I've only done a few days of testing on it. It feels close to done, but I want to include auto-detect of the usb-to-serial connection before I'll really be happy with it. By the way, since that's not written yet, you will likely need to change lines 92-93 of socketclient.sh to match the name of your virtual file to arduino. Here's how to do it on a mac:
Oh, one last note... the arduino code doesn't care what OS you are running, but the client software is written for Mac OS X. That's probably another good reason for a version number of 0.8 and not 1. I've had this same script running under XUbuntu, so I know it will work, but I think I overwrote that file when I had to install Windows on my Linux box for testing hardware. It's only a few lines, probably the 2 commented-out lines (94 and 95). Uncomment these if you're running linux and give it a try. Update: comment out lines 92 and 93 (mac serial connection), uncomment 95/96, and change 96 to say "stty -F /dev/ttyUSB0 115200 cs8 cread" and you should be good to go... So goals for version 1.0 are:
|