CHANGE RFID PINES

Hello. : Smiley-confunden:

I need to use my rfid reader in a different pins to those used by default.

I have an ethernet shield 2 and on pins 10, 11 , 12 and 13 did not work for me

What I can do?

I put the code here

Thank you.

RFIDUNO.ino (2.46 KB)

SPI devices are designed to share pins... except the SS pin, that must be unique.

Change the RFID definition for Slave Select "(NSS) SAD (SS) 10" to something like pin 8. Assuming it is free.

All the other pins can be shared with both devices

#define SAD 10 becomes #define SAD 8

I have an ethernet shield 2 and on pins 10, 11 , 12 and 13 did not work for me

If the above answer is not for you, although there is nothing wrong with it, you can always bit bang the SPI protocol on any set of pins you like. For an example look at the code for the AdaFruit wave shield. That bit bangs the SPI to talk to the D/A converter chip because you loose the place in the file if you try the above method on an SD card.

In case you really mean RFID Pines this paper explains how to do it. While it is not a pine tree I suspect the same technique will still work.

Gruber2004-Measuring_Activity_of_Geckos_with_an_Automatic_Movement_Monitoring_System.pdf (87.1 KB)