|
||||||
|
||||||
|
상품번호 : 83 | |
(0) | (2) |
---|
저가의 RFID 리더기입니다. MFRC522 칩을 사용한 리더기로 MIFARE RFID 카드를 읽고 쓸수 있습니다.
아래와 같이 RFID 리더기와 Arduino UNO R3 를 연결합니다.
RFID 리더기 핀 | Arduino UNO R3 |
---|---|
SDA | 10 |
SCK | 13 |
MOSI | 11 |
MISO | 12 |
GND | GND |
RESET | 9 |
3.3V | 3.3V |
/*
알찬 아두이노 키트(입문자용) 의 RFID-RC522로 받은 데이터를 화면에 출력하는 예제 연결 Arduino UNO RFID-RC522 ------------------------------------------------- 10 SPI SS SDA 13 SPI SCK SCK 11 SPI MOSI MOSI 12 SPI MISO MISO 9 SPI RESET RST */ #include #include #define RST_PIN 9 // #define SS_PIN 10 // MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance void setup() { Serial.begin(115200); SPI.begin(); // Init SPI bus mfrc522.PCD_Init(); // Init MFRC522 ShowReaderDetails(); // Show details of PCD - MFRC522 Card Reader details Serial.println(F("Scan PICC to see UID, type, and data blocks...")); } 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)); } void ShowReaderDetails() { // Get the MFRC522 software version byte v = mfrc522.PCD_ReadRegister(mfrc522.VersionReg); Serial.print(F("MFRC522 Software Version: 0x")); Serial.print(v, HEX); if (v == 0x91) Serial.print(F(" = v1.0")); else if (v == 0x92) Serial.print(F(" = v2.0")); else Serial.print(F(" (unknown)")); Serial.println(""); // When 0x00 or 0xFF is returned, communication probably failed if ((v == 0x00) || (v == 0xFF)) { Serial.println(F("WARNING: Communication failure, is the MFRC522 properly connected?")); } } |
RFID CARD ID (예: B5 07 F6 07)를 보여주고 1K에 대한 정보를 출력합니다.
최신 자료 및 소스 코드는 https://docs.whiteat.com/?p=2325 를 참조하세요.
WAT-Arduino128 연결 예제
https://docs.whiteat.com/?p=658
(0) | (2) |
---|
<<<<<<<<<<<<< 전체 상품 후기 보기 (클릭) >>>>>>>>>>>>>> |
(0) | (2) |
---|
(0) | (2) |
---|
|
|||||||||||
회사명 : 화이트앳
| 사업자등록번호 : 106-11-55283 [사업자정보확인]
| 주소 : 서울특별시 구로구 고척동 253-64 지층 101호 통신판매업 신고 : 2022-서울구로-1047 | 연락처 : 070-4412-5754 | FAX : 02-0000-0000 | 개인정보관리 책임자 : 한정욱 | 대표자 : 박원호 contact : help@kit128.com for more information |
|||||||||||