ID12 RFID Reader
An RFID reader module that reads tags and sends the ID as a 9600-8N1 serial stream
Hello World
Import programID12RFID_HelloWorld
Hello World for the ID12 RFID reader library
Library
Import libraryID12RFID
ID12 RFID library for reading 125KHz RFID tags
Pinout
Datasheet
http://www.sparkfun.com/datasheets/Sensors/ID-12-Datasheet.pdfNotes
The example code does not take into consideration HEX values, in the result, with this snippit, it is delt with
int ID12RFID::readable() { } int ID12RFID::read() { while (_rfid.getc() != 2); int v = 0; _rfid.getc(); // drop 1st 2 bytes - we actually only read the lower 32-bits of the code _rfid.getc(); for (int i=7; i>=0; i--) { char c = _rfid.getc(); // a ascii hex char int part = c - '0'; // test if 'Alpha' if (part > 9) part -= 7; // was 6 v |= part << (i * 4); } for (int i=0; i<5; i++) { _rfid.getc(); } return v; }
Breadboard Circuit
Library
The mbed library for the ID12 RFID reader, returning the 32-bits of the ID as an int
You need to log in to post a discussion