Rc522 + argon (unable to scan cards)

Hello ,
I connected an rc522 module to my particle argon and tried using the MFRC522
library from the web ide but I m unable to read any data from the provided cards.

I didn’t follow the wiring instructions since they were made for spark devices.

My connections:
SDA : A4
RST : D6

I changed the lines that define the SDA and RST pins accordingly .

Thanks for your help!

How have you set the pin values for SDA (aka SS) and RST in your sketch?

How have you connected IRQ?

Also, the SPI bus speed may be an issue - it is using DIV8 - maybe you should set the speed to be 2MHz. To do that you would need to edit the .cpp file where the SPI is configured.

I changed the SS pin to D5 and haven’t connected irq.
Here are some code snippets that might be relevant.

Is there a reason to use SPI1 rather than SPI and have you connected SCK, MOSI, MISO pins to secondary port? Suggests not since you have used RST_PIN on D2?

  • SCK => D2
  • MOSI => D3
  • MISO => D4

I tried spi1 because I am on device os 4.2.0 and according to the particle spi documention spi1 used to be faster prior to 5.3.1 (unless I totally misunderstood)

This is exactly how I connected the module :

Btw thanks for your help !