Cov txheej txheem:

RFID-RC522 Nrog Arduino: 6 Kauj Ruam
RFID-RC522 Nrog Arduino: 6 Kauj Ruam

Video: RFID-RC522 Nrog Arduino: 6 Kauj Ruam

Video: RFID-RC522 Nrog Arduino: 6 Kauj Ruam
Video: Электронный замок с RFID на Arduino 2024, Kaum ib hlis
Anonim
Image
Image
Npaj Txhua Yam Khoom Koj Xav Tau!
Npaj Txhua Yam Khoom Koj Xav Tau!

Koj puas tau hnov qab koj tus password?

RFID-RC522 tuaj yeem pab koj daws qhov teeb meem no!

Los ntawm kev siv RFID-RC522, tuaj yeem pab koj nkag mus rau hauv koj tus as khauj siv daim npav. Tsis yog qhov txaus?

Txoj haujlwm no yuav qhia koj yuav nyeem daim npav UID li cas thiab siv daim npav ntawd nkag mus rau hauv koj tus as khauj.

Rau txoj haujlwm no, muaj 4 theem tseem ceeb:

1. Kev teeb tsa

2. Upload Code#1 - rau qib no, koj yuav pom UID rau koj daim npav Mifare.

3. Upload Code#1 dua - raws li koj pom qhov UID ntawm Mifare daim npav, luam thiab muab tso rau hauv koj li Code#1 thiab nkag mus rau tus as khauj tus account uas koj xav tau.

4. Kho koj qhov project

*Tsis txhob ntshai thaum koj sau cov cai. Hauv txhua kab, kuv yuav piav qhia tias koj yuav tsum ua dab tsi lossis qhov ntawv sau no hais txog dab tsi.

Khoom siv

  • Arduino Leonardo x1
  • Lub laptop x1
  • Cov tub ntxhais sib txuas sib txuas x7
  • USB cable x1
  • Electronic Breadboard x1
  • RFID-RC522 x1
  • Mifare Card x2

Kauj Ruam 1: Npaj Txhua Yam Khoom Koj Xav Tau

Npaj Txhua Yam Khoom Koj Xav Tau!
Npaj Txhua Yam Khoom Koj Xav Tau!
Npaj Txhua Yam Khoom Koj Xav Tau!
Npaj Txhua Yam Khoom Koj Xav Tau!

Thov txheeb xyuas ntu "Cov Khoom Siv" saum toj no.

Kauj ruam 2: Teeb tsa

Teeb
Teeb
Teeb
Teeb
Teeb
Teeb
Teeb
Teeb

Koj yuav tsum muaj 7 lub xov tooj sib txuas hlau txuas txuas RFID-RC522 rau Arduino (Kuv siv Arduino Leonardo, tab sis koj tuaj yeem xaiv lwm tus).

1. SDA - txuas rau tus Pin 10

2. SCK - ICSP -3 (ICSP nyob sab xis ntawm lub rooj tsavxwm)

3. MOSI - ICSP -4

4. MISO - ICSP -1

5. IQR - peb tsis xav tau rau txoj haujlwm no

6. GND - NCO

7. RST - Pib dua

8. Vcc - 3.3v

*Yog tias koj tsis siv Arduino Leonardo, thov khij daim duab thib ob los txuas rau hauv qhov chaw raug.

Kauj ruam 3: Rub lub Tsev Qiv Ntawv

Thov saib cov vis dis aus saum toj no thiab rub lub tsev qiv ntawv.

Kauj ruam 4: Upload Koj Cov Cai

[Code]

Thaum koj upload koj cov cai, qhib Serial Monitor uas yog nyob rau sab xis saum toj ntawm koj cov cai.

Tom qab ntawd, muab koj daim npav kaw rau ntawm RFID-RC522, nws yuav qhia UID ntawm koj daim npav.

Thaum kawg, theej daim UID thiab muab lo rau koj tus lej (Kuv yuav cim qhov chaw).

Kauj Ruam 5: Tshaj Tawm Txoj Cai Ntxiv

Tom qab dhau qhov UID ntawm daim npav ntawm tus lej, koj tuaj yeem pib xav txog tus lej nyiaj twg koj yuav siv. Hauv txoj haujlwm no, Kuv siv tus password ntawm kuv lub khoos phis tawj thiab Kab (yog li kuv muaj 2 daim npav Mifare). Thaum koj xam tawm, koj tuaj yeem sau rau qhov chaws (Kuv tseem yuav cim qhov chaw koj yuav tsum tau sau). Thaum koj ua tiav, koj tuaj yeem tso tus lej qub (tus lej uas muaj koj tus lej zais).

Kauj ruam 6: Kho kom zoo nkauj

Tom qab ua tiav txhua qib, koj tuaj yeem sim kho koj qhov project!

Kuv nyiam siv daim txiag ntawv thaum koj ua qhov no.

Pom zoo: