I have a 522 module with very simple code to get the ID.
/*
PINOUT:
RC522 MODULE MEGA
SDA D53
SCK D52
MOSI D51
MISO D50
IRQ N/A
GND GND
RST D5
3.3V 3.3V
*/
/* Include the standard Arduino SPI library */
#include <SPI.h>
/* Include the RFID library */
#include <RFID.h>
/* Define the DIO used for the SDA (SS) and RST (reset) pins. */
#define SDA_DIO 53
#define RESET_DIO 5
/* Create an instance of the RFID library */
RFID RC522(SDA_DIO, RESET_DIO);
void setup()
{
Serial.begin(9600);
/* Enable the SPI interface */
SPI.begin();
/* Initialise the RFID reader */
RC522.init();
}
void loop()
{
if (RC522.isCard())
{
/* If so then get its serial number */
RC522.readCardSerial();
Serial.println("Hello kevin");
for(int i=0;i<5;i++)
{
Serial.print(RC522.serNum[i],DEC);
//Serial.print(RC522.serNum[i],HEX); //to print card detail in Hexa Decimal format
}
Serial.println();
Serial.println();
}
delay(1000);
}
Sometimes it will work for ages then it just stops!
Any ideas? There seems to be lots of discussions on this but no real answers.....