Merge pull request #74 from UnKnoWn-Consortium/patch-7
Update ReadAndWrite.ino
This commit is contained in:
@@ -14,16 +14,17 @@
|
||||
*
|
||||
*
|
||||
* Typical pin layout used:
|
||||
* ------------------------------------------------------------
|
||||
* MFRC522 Arduino Arduino Arduino
|
||||
* Reader/PCD Uno Mega Nano v3
|
||||
* Signal Pin Pin Pin Pin
|
||||
* ------------------------------------------------------------
|
||||
* RST/Reset RST 9 5 D9
|
||||
* SPI SS SDA(SS) 10 53 D10
|
||||
* SPI MOSI MOSI 11 / ICSP-4 51 D11
|
||||
* SPI MISO MISO 12 / ICSP-1 50 D12
|
||||
* SPI SCK SCK 13 / ICSP-3 52 D13
|
||||
* -----------------------------------------------------------------------------------------
|
||||
* MFRC522 Arduino Arduino Arduino Arduino Arduino
|
||||
* Reader/PCD Uno Mega Nano v3 Leonardo/Micro Pro Micro
|
||||
* Signal Pin Pin Pin Pin Pin Pin
|
||||
* -----------------------------------------------------------------------------------------
|
||||
* RST/Reset RST 9 5 D9 RESET/ICSP-5 RST
|
||||
* SPI SS SDA(SS) 10 53 D10 10 10
|
||||
* SPI MOSI MOSI 11 / ICSP-4 51 D11 ICSP-4 16
|
||||
* SPI MISO MISO 12 / ICSP-1 50 D12 ICSP-1 14
|
||||
* SPI SCK SCK 13 / ICSP-3 52 D13 ICSP-3 15
|
||||
*
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
@@ -41,6 +42,7 @@ MFRC522::MIFARE_Key key;
|
||||
*/
|
||||
void setup() {
|
||||
Serial.begin(9600); // Initialize serial communications with the PC
|
||||
while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
|
||||
SPI.begin(); // Init SPI bus
|
||||
mfrc522.PCD_Init(); // Init MFRC522 card
|
||||
|
||||
|
||||
Reference in New Issue
Block a user