I'm doing a project on Arduino Uno and it requires me to connect 3 different sensors together: Waveshare 2.9 E-paper, MFRC522 RFID Reader and a ESP8266 wifi module. problem is, The e-paper and RFID uses the same multiple digital pins. How can I connect all of them together in a beardboard?

Edit: The E-Paper uses:

e-paper 3V3 -> Arduino 3V3
e-paper GND -> Arduino GND
e-paper DIN -> Arduino D11
e-paper CLK -> Arduino D13
e-paper CS -> Arduino D10
e-paper DC -> Arduino D9
e-paper RST -> Arduino D8
e-paper BUSY -> Arduino D7

The rfid uses:

SDA --> Digital 10
SCK --> Digital 13
MOSI --> Digital 11
MISO --> Digital 12
IRQ --> unconnected
RST --> Digital 9
3.3V -->3.3V

The wifi uses:

VIN --> 3.3v
Enable --> 3.3V
TX --> RX
RX --> TX

I'm very new to electronics so i'm sorry if something does not make sense

I'm using library, code and instructions from this 3 websites:

E-paper ( Waveshare 2.9 E-paper): https://www.instructables.com/id/Getting-Started-With-E-Paper-Display-Modules/

RFID (MFRC522 RFID Reader): https://randomnerdtutorials.com/security-access-using-mfrc522-rfid-reader-with-arduino/

Wi-Fi (ESP8266 wifi module): https://www.hackster.io/jeffpar0721/add-wifi-to-arduino-uno-663b9e


  • Such a question cannot be answered in general, but only with full specifics of how each pin is being used. In many cases you will be able to relocate one function to a different pin, or the pins are being used in ways (such as SPI or I2C busses) which are already designed to be shared. But without full details this is unanswerable and will have to be closed. Nov 10, 2018 at 14:51
  • @Arthane, you can use the preview under your post to check formatting before submission. Use the {} code tags to format as in my tidy-up. I didn't fix your "beardboard" as it looks interesting.
    – Transistor
    Nov 10, 2018 at 14:59
  • The normal procedure is to first check which interfaces you need and then select a suitable CPU. Blindly grabbing an Arduino (that name itself is anathema on this site) is not the right way.
    – Oldfart
    Nov 10, 2018 at 15:32
  • You'll need to modify the code, most likely.
    – Felthry
    Nov 10, 2018 at 15:48

1 Answer 1


You are lucky, the two devices creating the conflict both use the same pins because they both use the same interface, SPI to be precise, which allows to have multiple devices connected using different Chip Select pins, abbreviated as CS.

Of the two libraries, one allows to define the CS pin (RFID module), the other has it hardcoded (ePaper). So, when declaring your RFID library, you should use the constructor that allows to define the chip select pin:

void PCD_Init(byte chipSelectPin, byte resetPowerDownPin);

This means in your code you should use:

PCD_Init(6,8) rfid;

The above also implies one of your RFID connections must be changed: what was previously SDA --> Digital 10 is now going to be SDA --> Digital 6. Please note I picked pin 6 randomly among the pins that seem unused by your code, but any other unused pin will be a good choice, including analog pins.

BTW, the web page about the RFID module uses a pin naming which causes a lot of confusion because it mixes up SDA with MISO and MOSI: those names are used in two different types of interface, the former is called I2C or TWI, the latter SPI. On Arduino the two interfaces share a couple of pins, but they are very different in many different ways.

In your case both modules use SPI, which is good for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.