
Parallax USB RFID
Watch the video demo here.
This tutorial assumes that you’ve got Processing and the Parallax RFID reader running as per the Parallax -> Arduino document here: http://docs.google.com/View?id=dg895rd7_534c58v2g7
Things you need
Download drivers from http://www.ftdichip.com/Drivers/VCP.htm
1 x Parallax RFID Reader – USB version
6 x RFID tags (hopefully you know the unique ID for each of these)
Get Processing from here: http://processing.org/download/
The compiled flash code from this zip file: http://www.jaymatter.com/ecuad/rfid_2_flash.zip
IF you want to look at the Flash source code, get it here: http://www.jaymatter.com/ecuad/rfid_2_flash_src.zip
The Flash source code is written in Actionscript 3 in Flex Builder 3.
If you want Flex Builder 3 it is free to students but you have to send a scan of your student ID: https://freeriatools.adobe.com/flex/
Alternatively, you can use Eclipse with the Flex or Actionscript 3 plugin (all free but setup is outside the scope of this document for now).
Setup your hardware
Plug your Parallax RFID into your computer with the usb cable.
Setup Processing
Paste this code into a new Processing document:
import processing.serial.*;
import processing.net.*;
// The serial port:
Serial rfidPort;
// The socket server
Server server;
int port = 8080;
void setup()
{
// List all the available serial ports:
println(Serial.list());
/* Open whatever port is the one you're using. */
rfidPort = new Serial(this, Serial.list()[0], 2400);
rfidPort.setDTR(true);
server = new Server(this, port);
}
void draw() {
while (rfidPort.available() > 0) {
int inByte = rfidPort.read();
println(inByte);
server.write(inByte);
}
}
Setup the xml
Unzip the Flash zip file. In the folder called ‘xml’ open the file called data.xml. This file creates relationships between the photos in the ‘images’ folder, and your tags. This piece of code describes one image, with a description (it’s called a ‘node’):
<image url="./images/5.jpg" rfid="01068DD013">
Donec ornare fringilla libero.
</image>
The ‘url’ attribute is the location of an image. The ‘rfid’ attribute is the unique tag that you want to associate to the image in the same ‘image’ node. The text between the two ‘image’ tags is the description text associated to the same image. It appears with the associated image in the Flash.
Put your tag and image data into the xml structure.
Run the Flash file
Run the html file called RFID2Flash.html. Your browser should open with a black screen. If the connection to your RFID is successful, you will see a confirmation in your browser window. If you get an error, make sure your RFID reader is connected properly and that the Processing sketch is running.
Test the setup
Take one of your tags and hold it up to the reader. The image and text that you associated to that tag in the xml file should appear in your browser. Try the different tags and make sure they all work. You’re done!












Jay says:
The flash for this has been updated – Oct 7, 2009
Sep 22, 2009, 12:29 amJay says:
Here’s some Processing code to report the unique IDs for RFID tags using the Parallax RFID reader:
// start processing code
// this snippet will write rfid tag IDs to Processing’s output screen
import processing.serial.*;
// The serial port:
Serial rfidPort;
void setup() {
// List all the available serial ports:
println(Serial.list());
rfidPort = new Serial(this, Serial.list()[0], 2400);
rfidPort.setDTR(true);
}
void draw() {
while (rfidPort.available() > 0) {
String inString = rfidPort.readString();
print(inString);
}
}
// end processing code
Sep 22, 2009, 10:37 pmstephanie v says:
hey Jay,
thanks for running this tutorial in our class last semester. i have a relatively complicated question regarding this code and translating it into something that could run an audio clip. would it be okay if i emailed you with a better explanation of my question?
cheers!
Sep 22, 2009, 3:22 pmJay says:
For sure Stephanie!
Sep 22, 2009, 12:41 ammen says:
hie jay,
im doing this rfid application using the actionscript too.
unfortunately, im not using the parallax rfid reader.
is it the same as other rfid readers? im using this reader where it is connected to the pc using a serial communication port.
right now i i think i have got the rfid data to get onto this proxy through tinkerproxy. could your as3 coding relate to that?
what does that Processing and arduino board do? can my rfid reader application with as3 work well without them?
Sep 22, 2009, 5:11 amParallax RFID to Flash « Ian Hurley's Blog says:
[...] Parallax RFID to Flash for this idea the guy is doing a very similar idea to what I plan on doing. He is using Processing to code and linking it to flash. Instead of an arduino he is using a Parallax RFID reader which has a built in usb. I’m not sure how it works but it seems to be very similar. For the flash he is using a card to change a picture, which is what I want to do. The site is http://www.jaymatter.com/2009/09/22/parallax-rfid-flash/ [...]
Sep 22, 2009, 5:52 am