Notes About Working with Various Arduino & Netduino Microcontroller Boards

Monday, June 18, 2012

Links for Parallax RFID R/W

The following links cover the Parallax RFID read-write unit (model 28440, black rather than blue color of the read-only RFID unit).

Data Sheet
Sample Code (Arduino Playground)

Note that the code - as given - has different addresses in the samples for reading and writing, so the results may not work as expected without modifying the address that is written or read.

The write-data example sets the location to 4 in this line:

#define whichSpace 4

The read-data example, however, has this code that causes it to read from location 32:

void loop()
{
 int val;
  mySerial.print("!RW");
  mySerial.write(byte(RFID_READ));
  mySerial.write(byte(32));

To read back from location 4 (used in the write code), use this:

void loop()
{
 int val;
  mySerial.print("!RW");
  mySerial.write(byte(RFID_READ));
  mySerial.write(byte(4));

No comments:

Post a Comment