Can I use the same pin multiple times?

Hi,

I am trying to connect a RFID Module and Numpad to my ESP32, and it seems I need pin D18 and D19 for both things. Can I simply use the same pins twice, or what would the solution be?

Welcome to the forum

You cannot use the same pin for two different purposes like that

Which Arduino board are you using and why do you need to use the same pins for 2 purposes ?

Im not really using an arduino board, just an ESP32. I need to setup both the numpad and the rfid module, and apparently they both need the D18 and D19. If this is true, I am not sure. But that’s what it says online

Are you using a tutorial? If so, please link it, so we can take a look.

You can use other pins if you are not using a special function. You simply need to modify the code to reflect the pin change.

Do both devices use the SPI interface by any chance ?

If your Numpad is something like below, you can move the connections to unused pins on the ESP32 and adjust your code to use those pins. Note that we usually refer to this as a keypad :wink: and there is a library for it. If it's a totally different Numpad, please provide a link.

image

I'm not familiar with ESP32 so can't advise which pins can be used; some seem to be "forbidden area".

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