Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lsongdev/rfid-rc522
RFID-RC522 for Arduino
https://github.com/lsongdev/rfid-rc522
arduino nfc rfid
Last synced: 3 days ago
JSON representation
RFID-RC522 for Arduino
- Host: GitHub
- URL: https://github.com/lsongdev/rfid-rc522
- Owner: lsongdev
- Created: 2014-02-19T02:59:56.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-07-18T04:41:10.000Z (over 6 years ago)
- Last Synced: 2024-12-31T10:05:36.654Z (5 days ago)
- Topics: arduino, nfc, rfid
- Language: C++
- Size: 15.6 KB
- Stars: 24
- Watchers: 4
- Forks: 23
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Get start RFID with Arduino
## First
+ Arduino UNO v3
+ RFID RC522## Connect
Pin layout should be as follows:
| RFID | Arduino |
|:-----|--------:|
| 3.3V | 3.3V |
| RST | 9 |
| GND | GND |
| MISO | 12 |
| MOSI | 11 |
| SCK | 13 |
| SDA | 10 |
| IRQ | - |**IRQ** Not connected
## Installing RFID Libraries
cd ~/Documents/Arduino/libraries
git clone https://github.com/song940/rfid.git RFID
reboot arduino .## Example Code
```cpp
#include
#include#define SS_PIN 10
#define RST_PIN 9RFID rfid(SS_PIN, RST_PIN);
void setup()
{
Serial.begin(9600);
SPI.begin();
rfid.init();
}void loop()
{
if (rfid.isCard()) {
Serial.println("Find the card!");
if (rfid.readCardSerial()) {
Serial.print("The card's number is : ");
Serial.print(rfid.serNum[0],HEX);
Serial.print(rfid.serNum[1],HEX);
Serial.print(rfid.serNum[2],HEX);
Serial.print(rfid.serNum[3],HEX);
Serial.print(rfid.serNum[4],HEX);
Serial.println(" ");
}
rfid.selectTag(rfid.serNum);
}
rfid.halt();
}
```
## License[MIT](http://lsong.mit-license.org/)