miguelbalboa / rfid

Arduino RFID Library for MFRC522
The Unlicense
2.73k stars 1.42k forks source link

Example "Minimal-SPI" does not compile #609

Closed Eheran1 closed 6 months ago

Eheran1 commented 9 months ago

Arduino IDE 2.2.1 The example "Minimal-SPI" fails to compile since it is coded differently.

constexpr uint8_t RST_PIN = 32;          // Configurable, see typical pin layout above
constexpr uint8_t SS_PIN =  15;         // Configurable, see typical pin layout above

MFRC522_SPI spiDevice = MFRC522_SPI(SS_PIN, RST_PIN);
MFRC522 mfrc522 = MFRC522(spiDevice);  // Create MFRC522 instance
[...]
SPI.begin(14, 12, 13);

Compare this to other example codes that compile:

#define RST_PIN         9           // Configurable, see typical pin layout above
#define SS_PIN          10          // Configurable, see typical pin layout above

MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.
MFRC522::MIFARE_Key key;
[...]
SPI.begin();        // Init SPI bus
Rotzbua commented 6 months ago

This library has no such example.