#include #include #define RST_PIN 9 // Configurable reset pin #define SS_PIN 10 // Configurable slave select pin MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance void setup() Serial.begin(9600); // Initialize serial communications with the PC while (!Serial); // Do nothing if no serial port is opened SPI.begin(); // Init SPI bus mfrc522.PCD_Init(); // Init MFRC522 card Serial.println(F("--- RC522 Simulation Initialized ---")); Serial.println(F("Scan a virtual tag to see data...")); void loop() // Reset the loop if no new card is present on the sensor/simulation trigger if ( ! mfrc522.PICC_IsNewCardPresent()) return; // Select one of the cards if ( ! mfrc522.PICC_ReadCardSerial()) return; // Dump debug info from the card; This outputs UID to the Virtual Terminal Serial.print(F("Card UID:")); for (byte i = 0; i < mfrc522.uid.size; i++) Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "); Serial.print(mfrc522.uid.uidByte[i], HEX); Serial.println(); // Halt PICC to stop continuous reading in simulation loop mfrc522.PICC_HaltA(); delay(1000); Use code with caution. Compiling and Loading the Code: Open the Arduino IDE and paste the code above.
: Write your control logic in an IDE (like the Arduino IDE). Compile the code to generate a .hex file. rc522 proteus library
Everything you need to know
Create your free account, get a fax number, and start sending secure faxes.
No setup required.

