ID12 RFID library for reading 125KHz RFID tags
Dependents: ID12RFID_HelloWorld MyFinalDerbot RFID_CatDoor TweetRFID ... more
ID12RFID Class Reference
An interface for the ID-12 RFID reader device. More...
#include <ID12RFID.h>
Public Member Functions | |
ID12RFID (PinName rx) | |
Create an ID12 RFID interface, connected to the specified Serial rx port. | |
int | readable () |
Non blocking function to determine if an ID has been received. | |
int | read () |
A blocking function that will return a tag ID when available. |
Detailed Description
An interface for the ID-12 RFID reader device.
// Print RFID tag numbers #include "mbed.h" #include "ID12RFID.h" ID12RFID rfid(p10); // serial rx int main() { while(1) { if(rfid.readable()) { printf("RFID Tag number : %d\n", rfid.read()); } } }
Definition at line 47 of file ID12RFID.h.
Constructor & Destructor Documentation
ID12RFID | ( | PinName | rx ) |
Create an ID12 RFID interface, connected to the specified Serial rx port.
- Parameters:
-
rx Recieve pin
Definition at line 27 of file ID12RFID.cpp.
Member Function Documentation
int read | ( | ) |
A blocking function that will return a tag ID when available.
- Returns:
- The ID tag value
Definition at line 35 of file ID12RFID.cpp.
int readable | ( | ) |
Non blocking function to determine if an ID has been received.
- Returns:
- Non zero value when the device is readable
Definition at line 31 of file ID12RFID.cpp.
Generated on Tue Jul 12 2022 18:54:21 by
![doxygen](doxygen.png)