Update FixBrickedUID.ino
Updated code to account for serial behavior change in ATMEGA32U4
This commit is contained in:
@@ -49,6 +49,7 @@ 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
|
||||||
|
while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
|
||||||
SPI.begin(); // Init SPI bus
|
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!");
|
||||||
|
|||||||
Reference in New Issue
Block a user