Ikuti aku terus ya, disini :

Rabu, 02 Juli 2014

How To Know UID Card Of RFID-RC522

Hello, my name Ressofi Kuswan. I have been trying how to read rfid card on Arduino, you simply put the program on your Arduino application. and this is the program.

#include
#include

#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.

void setup() {
Serial.begin(9600); // Initialize serial communications with the PC
SPI.begin(); // Init SPI bus
mfrc522.PCD_Init(); // Init MFRC522 card
Serial.println("Scan PICC to see UID and type...");
}

void loop() {
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent()) {
return;
}

// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial()) {
return;
}

// Dump debug info about the card. PICC_HaltA() is automatically called.
mfrc522.PICC_DumpToSerial(&(mfrc522.uid));
}

may be useful for those of you who want to know.

Tidak ada komentar:

Posting Komentar