22 lines
292 B
C++
22 lines
292 B
C++
#pragma once
|
|
#include <SPI.h>
|
|
#include <MFRC522.h>
|
|
|
|
class RFIDReader {
|
|
public:
|
|
RFIDReader(int ssPin, int rstPin);
|
|
|
|
void begin();
|
|
|
|
bool check();
|
|
|
|
void printUID() const;
|
|
|
|
const byte* getUID() const;
|
|
byte getUIDSize() const;
|
|
|
|
private:
|
|
MFRC522 _rfid;
|
|
MFRC522::MIFARE_Key _key;
|
|
};
|