Skip to main content
Share Your Experience: Take the 2024 Developer Survey
11 votes

Request for help condensing code and saving memory

You have a huge switch...case here to decide the name of the file that should be played. This costs a lot of code space, but also data space, because every single literal string in this portion of ...
Edgar Bonet's user avatar
  • 43.3k
5 votes

Multiple MFRC522 RFID reader on Uno bugs

For convenience, here is a comment: You wrote, “I've tried the code above but it didn't work”. That is inadequate to convey what happened and what you wanted to happen. Please edit your question ...
James Waldby - jwpat7's user avatar
4 votes
Accepted

RFID detects the first card fine, but hangs on a second

You should try adding this, at the end of readBlock(): // Halt PICC mfrc522.PICC_HaltA(); // Stop encryption on PCD mfrc522.PCD_StopCrypto1();
SoreDakeNoKoto's user avatar
4 votes

do i need to also connect GND and 3.3v

It is just so obvious that you should connect them that they did not bother to write it down. The reader needs power. That is taken as read. Without power it can do nothing. Why would they bother to ...
Majenko's user avatar
  • 105k
4 votes

Issue sharing MISO with multiple RC522 RFID Readers

I am joining this conversation VERY late, however maybe my answer can help someone who is just now looking into this. I was able to get SEVEN RC522 readers working on one Arduino! My solution was very ...
Michael's user avatar
  • 61
4 votes

Using interrrupts with RC522

I'm quite late to this party, but I was looking for a way to have the MFRC522 generate an interrupt when it detects a compatible RFID card/key fob/sticker/etc., and this is one of the hits I got from ...
Daniel Glasser's user avatar
4 votes

Arduino Nano wih mfrc522 warning error

You are using SPI comm. The code is fine too. Usually this "communication failure" happens due to wrong pin connections. Say for eg. If MOSI and MISO are interchanged. Check all connections, ground ...
Mitu Raj's user avatar
  • 424
4 votes

Can 1 wiegand output for 2 controllers?

In the readers there is switch transistors that pull down voltage provided from controllers, in other words is shutting signal to the ground. In my practice i tested many solutions and simplest one is ...
vetruk's user avatar
  • 41
4 votes

Request for help condensing code and saving memory

As a minor addendum to Edgar Bonet's excellent answer, you could simplify your code further and save even more memory by renaming your files. In particular, instead of storing a list of character ...
Ilmari Karonen's user avatar
3 votes
Accepted

NFC 'dynamic' UID database

You got me ;) Since a UID is a fixed size you don't need to think in "lines", only in bytes. The most efficient way of storing the UIDs is as pure bytes. I am not familiar with that specific card ...
Majenko's user avatar
  • 105k
3 votes

Arduino Shield on Breadboard

Chances are the offset headers won't allow the shield to directly plug into a breadboard. As @Majenko noted, shields have a header that is offset by 0.16" from the other headers. Since a breadboard ...
Mazaryk's user avatar
  • 1,149
3 votes
Accepted

How can my library source code instantiate an object from another library?

Why not have your class just extend the MFRC522 class? #include <MFRC522.h> class UltimateRFID : public MFRC522 { private: MIFARE_Key key; public: UltimateRFID(...
Majenko's user avatar
  • 105k
3 votes

"Soft WDT reset" stack error: RFID-RC522 with NodeMCU

can you also try to increase the serial boud rate to fe. 115200 instead of 9600? In some cases I had some issues with 9600, because some buffers were not cleared fast enough and forces some WDT resets....
Jorgen's user avatar
  • 131
3 votes
Accepted

Arduino TimerOne breaks the program when calling "digitalRead"

The time between 2 interrupt triggers is only 8us. Also digitalRead() is a quite big function, that needs some time to execute (I don't know how much). That way it is to short for the Serial print ...
chrisl's user avatar
  • 16.3k
3 votes

RFID-RC522 Can't read from MIFARE Ultralight

In the first lines of code there are two lines that say: #define RST_PIN 9 #define SS_PIN 10 They define the RESET pin to be on the D9 pin and the SDA on the D10 pin. So you have an connection error ...
Coder_fox's user avatar
  • 688
3 votes

What does this lines mean in RFID UID Card Reader Code?

The code formats UUID as a string of 4 hex bytes (each bytes a pair of hex digits) separated by colons. String ID = "" Blank the string for (byte i = 0; i < 4; i ++){ Iterate over the four ...
user85471's user avatar
  • 731
3 votes

Emulating a generic Mifare USB peripheral device with RFID-RC522

You have to use Arduino Mini and Keyboard.h library which comes with arduino IDE. Arduino Nano does not have HID capable processor. Try this with mini: #include <Keyboard.h> void setup() { /...
Marko Solomun's user avatar
3 votes
Accepted

Reading NFC card (PN532) with Arduino Uno

The default behaviour of readPassiveTargetID is to wait "forever" for a card - which is why your code only sees when there is a card present So, in setup() add nfc.setPassiveActivationRetries(0x10); ...
Jaromanda X's user avatar
2 votes

RFID/NFC Tag get data from wordpress MySQL

From what I can tell it's absolutely possible but will take some considerable development time and around $30-$70 of hardware per NFC terminal. Please note I would strongly not recommend this as a ...
amoose136's user avatar
2 votes

How to monitor a sensor for specific period

Here is a solution I found on one of the forums, I modified/simplified it to suit, but it does what you are after. I use a cheap MP3 player and small amp that runs all the time with the speaker ...
Doug's user avatar
  • 196
2 votes

How can I get ultra clean dc wall power for my arduino project?

This is what I use, although admittedly not in your application. I run it from a 12V wall adaptor and adjust the output voltage to suit my requirements. The input should ideally be at least a couple ...
Bra1n's user avatar
  • 1,008
2 votes

Extracting a substring from original string

Let's dissect your program a moment and see why it's not doing what you want: while (Serial.available() > 0) { So while there are characters available to read in the serial buffer rfid = ...
Majenko's user avatar
  • 105k
2 votes

Use RFID-RC522 with other Pins

Sorry I'm a bit late (5 years late) but hopefully this can help someone who's just now trying to do this! There's an old obscure Sunfounder library, "rfid1.h" that lets you declare every pin....
Michael's user avatar
  • 61
2 votes

rfid_default_keys check with RC522

Based on some experimenting, I believe the 1st key is skipped for one of two reasons: If you follow the code flow, in loop(), PICC_IsNewCardPresent() and PICC_ReadCardSerial() called. If a "new" card/...
Aram Perez's user avatar
2 votes

RC522 RFID reader doesn't read NTAG216 chip

I got my RFID kit (RF522) just this week, but I haven't had a chance to play with it yet - nor do I have an NTAG216 implant. But I remember when I was researching them seeing a couple of posts that ...
John Burger's user avatar
  • 1,875
2 votes

RFID reader for unknown tag 125kHz

It could be something else (in the RFID low freq ~ 125khz) like a HID card. Also it could be an NFC (high freq 13.56Mhz) that its not compatible with the RC522. Do you have access to a phone with NFC,...
ALEZA's user avatar
  • 55
2 votes

Issue sharing MISO with multiple RC522 RFID Readers

I do not know if every module has a pull-up resistance in sck and mosi if that is the case, it could be that for every module connected over teh lines the resistance gets lower. so maybe the module ...
Rodrigo Franco's user avatar
2 votes
Accepted

Using RFID and fingerprint sensor together

Get rid of the Serial.begin(9600). You're accidentally changing the Serial baud rate without doing the same in the serial monitor so you'll probably see gibberish, if anything.
SoreDakeNoKoto's user avatar
2 votes

How can my library source code instantiate an object from another library?

While @Majenko's answer is probably best (I +1'd it), for completeness, here's how to construct a member variable with parameters: class UltimateRFID { public: UltimateRFID(int ss, int rst) : ...
001's user avatar
  • 953

Only top scored, non community-wiki answers of a minimum length are eligible