Hi
I have this display (KHB31FC2)
And this RFID reader (RFID-RC522)
Library: RFID.zip from this page (I also tried the MFRC522 library. Same issue)
When i connect the shield and the reader, the rfid doesn't work. When i unplug the display shield, the rfid works.
I am just using an example sketch that looks like this:
#include <SPI.h>
#include <RFID.h>
#define SDA_DIO 45
#define RESET_DIO 22
RFID RC522(SDA_DIO, RESET_DIO);
void setup()
{
Serial.begin(9600);
SPI.begin();
RC522.init();
}
void loop()
{
if (RC522.isCard())
{
RC522.readCardSerial();
Serial.println("Card detected:");
for(int i=0;i<5;i++)
{
Serial.print(RC522.serNum[i],DEC);
}
Serial.println();
}
delay(1000);
}
The connection between the arduino mega and RFID-RC522 look like this:
| RFID | Mega |
|---|---|
| --------- | --------- |
| SDA | 45 |
| SCK | 52 |
| MOSI | 51 |
| MISO | 50 |
| GND | GND |
| RST | 22 |
| 3.3V | 3.3V |
| IRQ | Not connected |