Hot answers tagged

2

Your code loops from the high order byte to the low order byte, printing each byte as 2 hex digits. If you want instead to print the first byte as a decimal value, and then the remaining bytes as another decimal value, then do this: Print byte 0 in base 10: Serial.print(data[0]); //first byte Serial.print(":"); Then loop through the remaining ...


2

You are disabling interrupts for way too long. Interrupts are meant for handling time-critical tasks that cannot wait for a full loop iteration. If you ever disable them, it should be for a time as short as possible. In your case, you only need to disable interrupts while accessing the pulseCount variable, as this variable is shared between the ISR and the ...


2

UPDATE! The issue has been fixed, just after finding this stackoverflow answer by bat macumba. I'll leave the question here, in case someone stumbles into the same problem.


2

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. Like this: rfid.begin(IRQ,SCK,MOSI,MISO,NSS,RST); It's a bit hard to find the library online these days, but at the bottom of this page (http://wiki....


1

Very interesting project. What to do depends largely on your exact requirements. I guess you have chosen RFID for its easy usage, when everything is set up (like just placing the item roughly at the right spot, instead of needing extra electrical plugs or similar). I'm not being able to scale it In a case like this you normally wouldn't use just one ...


1

A arduino can theoretically use more sensors than it has bits of storage based on your lowlever programming and algorithmic skills. however since most people tend to only use one connection per arduino pin and mostly basic c++ and arduino instructions this is a lot lower. some people also use a shift register to easily increase the port amount. for your ...


1

Feel free to take a look at my YouTube videos. They are not monetized so I'm not self-promoting. You can even skip the videos and checkout my GitHub repo with the Master and Slave sketches. https://youtu.be/A9oSX_dwJKQ https://youtu.be/PSUzhCtNRRQ https://github.com/linhartr22/Arduino_SPI_Master_Slave_Demo


1

Right at the start of your loop you have this (and other similar constructs): if ( ! mfrc522.PICC_IsNewCardPresent()) { return; } That means that if no new card is present on reader 1 then the rest of the loop is ignored. Nothing else can happen. You need to restructure your whole program so that it works in the complete opposite way - instead of saying ...


1

As you might have already seen, a position sensing system can be really complex. Here I will list some possibilities, that come to my mind and might be fitting for your case or not. Matrix based solutions: Here I mean sensors a some sort arranged in a matrix underneath the game table, which can sense the object placed on them. As you know from your wiring, ...


1

I'm just starting a project using RFID tags to track cars and engines on a model railroad. Although I haven't gotten very far yet, my first thought was to use a multiplexer to select which reader I receive data from at any given time. It won't be simultaneous but I should be able to read a dozen or more per second which is probably enough.


1

Take a look at this this link it might be of a help to you. It uses four RFID readers at the same time


1

That's because you can only listen at one SoftwareSerial interface at a time. On the other interface you will receive nothing. The SoftwareSerial library uses interrupts to watch at the pins. These interrupts cannot easily be shared between different interfaces, thus the SoftwareSerial library doesn't support it. You can do 2 things: You could ditch the ...


1

The accepted way to initialize an array in C follows this example: const char ID [] = {111, 11, 11, 11}; You can read more about it here. You later use an array name ("ID") with no index ("ID[0]"). The C compiler assumes the programmer who uses an array name with no index is interested in the memory address of the first element of the array. But you ...


1

Assuming you have an RFID scanner that you can interface with the Arduino, sure. The Arduino is a modest 8-bit processor running at 8 or 16 mHz, with pretty limited memory. You program it in C/C++. What you describe is dirt-simple, and well within the abilities of an Arduino, so yes.


1

There is no real multitask on Arduinos. The Arduino can only do one thing at a time. But, you can do things sequentially, one after another, so fast, that a human will think, that it happens simultaneously. This involves a non-blocking coding style, which needs no interrupts Every delay in your code (at least the long onces) need to be removed. if you want ...


1

Your code written more complex, than it has to be, and you have much repeated code, that makes it harder to understand and change the code. So I will first describe, how to shorten and generalize your code. That will make it easier to implement new features, like invalidating a card after 3 wrong PIN entries. Handling the RFID cards: Currently you are using ...


1

1.initialize a global variable int failcount=0,MiFareCardMode=0; for reset put it in an if statement that checks fail count if(failcount==0) {reset code}``` in this piece of code increase the failcount number(line 195:200) also add an if statement to check which card was detected initialize a global variable to set the card status ...


1

I figured out that one get these kind of problems (reader get´s firmware version but can not read tags) are related to power consumption. I tried to power the reader with Heltec Lora 32 Dev board and it schowed exactly this behaviour. Now, connected to another 3,3V source everything works as it should :)


1

Same problem as above. Three card readers. Two worked. One didn't. All three readers had two pins bridged on the reader chip. The bridged pins were close to the pin 1 corner. I left the bridge alone as all three readers had the same bridge and one of the pins did not have a trace to it. The faulty card reader also had two pins bridged with solder in a ...


1

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 my search. I write this now for the pilgrim who follows the same breadcrumbs I have in the hopes that it will save them at least a little time. I tried ...


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