RFID Particle Argon help please

Hi Everyone,

I’m new to Particle and as my first project I have been trying to get an RFID card reader to work with a Particle Argon

I have followed the guide and copied the code listed in: https://www.hackster.io/ingo-lohs/rfid-kit-particle-photon-a-first-introduction-9544f1

However I cannot seem to get the Console to say anything other than “Card NOT detected” when testing with both a keychain and card reader.

Im using the following Pin combinations:

  • #define SS_PIN A2

  • #define RST_PIN D2

  • #define MOSI_PIN D3

  • #define MISO_PIN D4

  • #define SCK_PIN D5

  • 3V3 to 3V3

  • GND to GND.

Any help is greatly appreciated, thanks!

@AdamS28 welcome to the Community! If you look at the code you copied, the top of the file has:

/* Define the pins used for the DATA OUT (MOSI), DATA IN (MISO) and CLOCK (SCK) pins for SOFTWARE SPI ONLY */
/* Change as required and may be same as hardware SPI as listed in comments */
#define MOSI_PIN    D3      // hardware SPI: A5
#define MISO_PIN    D4      //     "     " : A4
#define SCK_PIN     D5      //     "     " : A3

/* Create an instance of the RFID library */
#if defined(_USE_SOFT_SPI_)
    RFID RC522(SS_PIN, RST_PIN, MOSI_PIN, MISO_PIN, SCK_PIN);    // Software SPI
#else
    RFID RC522(SS_PIN, RST_PIN);                                 // Hardware SPI
#endif

What’s important to note is that SPI pins D2, D3, D4 are used for software SPI, which is enabled when _USE_SOFT_SPI_ is defined, which isn’t by default. Instead the hardware SPI pins are used (A3, A4 and A5) as indicated above. If you change your wiring accordingly, you may have more luck!

1 Like

Hi @peekay123 - Thank you for the very quick reply and nice welcome

If I understand you correctly, I switched D3 -> A5. D4 -> A4 and D5 -> A3 however I cant get the Card ID to display.

From his article, I copied all 3 of the code files: .ino .h and .cpp - is there an easier way I can test my RFID reader? I am just looking to have it output the ID from the card somehow to ensure it works, thank you again for your help!

@peekay123, this keeps tripping me up all the time too - the Gen1&2 pinout is so hardwired in my brain that I often forget that Gen3 uses an entirely different pinout.

On the Argon (also Boron & Xenon) it’s not A3, A4, A5 as it would be on Gen2 devices but rather MI/D11, MO/D12, SCK/D13.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.