Hi all, I'm in the process of creating an RFID booking system with Arduino if anyone has any support they can offer for this and I'm currently encountering an error with this (please check attachments)
Many thanks!
Hi all, I'm in the process of creating an RFID booking system with Arduino if anyone has any support they can offer for this and I'm currently encountering an error with this (please check attachments)
Many thanks!
No, not using the phone. Attache code the way told in the advicing topics.
/*
*
* All the resources for this project: https://randomnerdtutorials.com/
* Modified by Rui Santos
*
* Created by FILIPEFLOP
*
*/
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
void setup()
{
Serial.begin(9600); // Initiate a serial communication
SPI.begin(); // Initiate SPI bus
mfrc522.PCD_Init(); // Initiate MFRC522
Serial.println("Approximate your card to the reader...");
Serial.println();
}
void loop()
{
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent())
{
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial())
{
return;
}
//Show UID on serial monitor
Serial.print("UID tag :");
String content= "";
byte letter;
for (byte i = 0; i < mfrc522.uid.size; i++)
{
Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");
Serial.print(mfrc522.uid.uidByte[i], HEX);
content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));
content.concat(String(mfrc522.uid.uidByte[i], HEX));
}
Serial.println();
Serial.print("Message : ");
content.toUpperCase();
if (content.substring(1) == "BD 31 15 2B") //change here the UID of the card/cards that you want to give access
{
Serial.println("Authorized access");
Serial.println();
delay(3000);
}
else {
Serial.println(" Access denied");
delay(3000);
}
}
Fine. What's the error You encount? (My chrystall ball is not on duty).
Personally, due to ignorance, I don't use return or break in the middle of the code.
If the second if returns the code will quickly execute the first if again. Is that okey?
Use one if and proceed if it's positive, and again.....
Seem to be getting the issue:
Firmware Version: 0x0 = (unknown)
WARNING: Communication failure, is the MFRC522 properly connected?
Scan PICC to see UID, SAK, type, and data blocks..
Let's wait for a helper having detailed knowledge about those things. I don't se where that message would come from.
Highly time for sleeping here, 4 AM......
Now expain, in detail, how you have everything wired.
This is my pin wiring:
SDA | Digital 10 |
---|---|
SCK | Digital 13 |
MOSI | Digital 11 |
MISO | Digital 12 |
IRQ | unconnected |
GND | GND |
RST | Digital 9 |
3.3V | 3.3V |
OK- I also need to know WHAT MFRC522 board (With a link) you have.
I just had a look at your images, you need to apply flux and resolder the pins, I would not trust that soldering.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.