Merge pull request #71 from UnKnoWn-Consortium/patch-4

Update FixBrickedUID.ino
This commit is contained in:
Miki Balboa
2015-01-26 09:08:36 -06:00

View File

@@ -23,15 +23,17 @@
http://mac86project.altervista.org/ http://mac86project.altervista.org/
----------------------------------------------------------------------------- Nicola Coppola ----------------------------------------------------------------------------- Nicola Coppola
* Pin layout should be as follows: * Typical pin layout used:
* Signal Pin Pin Pin * -----------------------------------------------------------------------------------------
* Arduino Uno Arduino Mega MFRC522 board * MFRC522 Arduino Arduino Arduino Arduino Arduino
* ------------------------------------------------------------ * Reader/PCD Uno Mega Nano v3 Leonardo/Micro Pro Micro
* Reset 9 5 RST * Signal Pin Pin Pin Pin Pin Pin
* SPI SS 10 53 SDA * -----------------------------------------------------------------------------------------
* SPI MOSI 11 51 MOSI * RST/Reset RST 9 5 D9 RESET/ICSP-5 RST
* SPI MISO 12 50 MISO * SPI SS SDA(SS) 10 53 D10 10 10
* SPI SCK 13 52 SCK * 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
* *
* The reader can be found on eBay for around 5 dollars. Search for "mf-rc522" on ebay.com. * The reader can be found on eBay for around 5 dollars. Search for "mf-rc522" on ebay.com.
*/ */
@@ -47,7 +49,8 @@ MFRC522::MIFARE_Key key;
void setup() { void setup() {
Serial.begin(9600); // Initialize serial communications with the PC Serial.begin(9600); // Initialize serial communications with the PC
SPI.begin(); // Init SPI bus 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 mfrc522.PCD_Init(); // Init MFRC522 card
Serial.println("Warning: this example clears your mifare UID, use with care!"); Serial.println("Warning: this example clears your mifare UID, use with care!");