Example program to read HID ProxCards using the gatech BuzzCard format with a HID ProxPoint Plus 6005BG00.
Dependencies: HID_Wiegand mbed USBDevice
See library: http://mbed.org/users/cbookman3/code/HID_Wiegand/wiki/Homepage
main.cpp
- Committer:
- cbookman3
- Date:
- 2014-04-23
- Revision:
- 4:51cb26420674
- Parent:
- 3:58f770be2eea
File content as of revision 4:51cb26420674:
#include "mbed.h" #include "Wiegand.h" #include "USBMouseKeyboard.h" /* Prototypes */ void onCardRead(); /* Globals */ //(PinName pdata0, PinName pdata1, PinName pHold, void (*onCardRead)()); Wiegand rfid(p30 , p29 , p28 , &onCardRead); /* hook up to a usb breakout board: D+ to D+, d- to d-, grnd to grnd If you do not have the usb breakout board for keyboard emulation, you can use Serial over USB by changing the USBMouseKeyboard line to read: Serial key_mouse(USBTX, USBRX); */ USBMouseKeyboard key_mouse; int main() { while(1) { rfid.doEvents(); //check if RFID Reader has read all data } } //function is run every time that rfid finishes reading a buzzcard void onCardRead() { uint64_t rawCardData = rfid.getBits(14,33); key_mouse.printf("%lld\r\n",rawCardData); }