I am using the MFRC522-I2C-Library-master, I am not sure where I got it from but I discovered that in the MFRC522 examples in the IDE, if I deleted the first few lines to do with SPI.....
#include <SPI.h>
#include <MFRC522.h>
#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
And replace them with.....
#include <Wire.h>
#include "MFRC522_I2C.h"
// 0x28 is i2c address on SDA.
MFRC522 mfrc522(0x28); // Create MFRC522 instance.
And replace SPI.begin(); with Wire.begin(); in the setup, the examples all work fine.
If however I install the library MFRC522_I2C.h via the IDE Library Administration the examples, even those delivered with it, won't compile. The first reason is because the official version of MFRC522_I2C.h uses
MFRC522_I2C mfrc522(0x28); rather than MFRC522 mfrc522(0x28); to create an MFRC522 instance. If I use the first statement to create a class I get the warning
No matching function call to 'MFRC522_I2C::MFRC522_I2C(int)'
If I try and compile one of the two examples supplied with the official MFRC522_I2C.h I get the warning (in the dual-i2c_scanner example supplied with the library) that there is
No matching function call to 'TwoWire::TwoWire(int)'
Probably I should stick with the MFRC522-I2C-Library-master, but I would like to know what is the cause of these warnings?