Hello everyone, has anyone tried to build a circuit using this RFID shield? I have been trying to connect it with Arduino's Monitor but not been succesful. As i didnt find any example for wiring the YUN, i connected like the Leonardo but still i havent been able to send anything through the serial port or to read the serial number of a card.
I have included a picture of how i connected the board and the sketch it's like this:
#include <SPI.h>
#include <MFRC522.h>
#define RST_PIN 9
#define SS_PIN 10 //Pin 10 para el SS (SDA) del RC522
MFRC522 mfrc522(SS_PIN, RST_PIN); //Creamos el objeto para el RC522
void setup() {
Serial.begin(9600); //Iniciamos la comunicación serial
SPI.begin(); //Iniciamos el Bus SPI
mfrc522.PCD_Init(); // Iniciamos el MFRC522
Serial.println("Lectura del UID");
}
void loop() {
// Revisamos si hay nuevas tarjetas presentes
if ( mfrc522.PICC_IsNewCardPresent())
{
//Seleccionamos una tarjeta
if ( mfrc522.PICC_ReadCardSerial())
{
// Enviamos serialemente su UID
Serial.print("Card UID:");
for (byte i = 0; i < mfrc522.uid.size; i++) {
Serial.print(mfrc522.uid.uidByte < 0x10 ? " 0" : " ");
_ Serial.print(mfrc522.uid.uidByte*, HEX); _
_ }_
_ Serial.println();_
_ // Terminamos la lectura de la tarjeta actual*_
* mfrc522.PICC_HaltA();
_ } _
_ }_
_}_
Maybe you saw that I have this in my code: #define RST_PIN 9 , the program it is for an Arduino UNO but the author said I only need to do the wiring different for another card and it would work, but it doesnt.
If you may be so kind of helping me with this. I am just beginning with Arduinos.
Thank you
*
