I recently bought myself the Thinkgeek Phidget RFID Kit to play around with. I was sad to discover that for some reason the Python libraries don’t work on my system (some combination of Python version + Vista + who knows yields errors that I don’t have the knowledge or energy to fix). However, I was able to get it working in Processing. Since I’ve seen other sites which claim that Phidget and Processing don’t work together easily (this may have been true in prior Processing releases), I thought I’d put my efforts out there for other interested parties to use.
I relied heavily on this post from Mikko at the Umeå Institute of Design, which shows how to work with a Phidget Accelerometer in Processing. I began by downloading the Phidget Java library files, and I was working with Processing 1.0.1. First thing to do is, in the Sketch menu, select “Open File” and then navigate to the Phidget21.jar file that came from the Phidget Java code. This will import the necessary library into the code folder in the Processing sketch. Then I basically altered the code in the “RFIDExample.java” to work in processing, using the accelerometer example as a guideline. The full code is below. (If you copy it into Processing and Auto Format it, it will probably be more comprehensible) It creates a small window that, if everything is working right, prints the ID of a tag brought close to the Phidget Reader. There is more detailed information printed in the system out window as well. Pretty basic, but from this framework the program can go in any number of directions. Hopefully this is a useful starting point for anyone looking to integrate RFID capabilities into Processing. Let me know in a comment here if you find any bugs or have any suggestions.