Hot answers tagged

11

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 code gets copied to RAM during initialization. There is no need to spend all this cost, as the file names have been assigned in a very regular fashion, so you can ...


4

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 names indexed by Amiibo number and using those as the filename prefix, why not use the Amiibo numbers directly? That is, instead of your files being named MARIO01....


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

The solution is that PN5180 simply cannot work without BUSY pin connected.


1

You can read data with : status = mfrc522.MIFARE_Read(blockNum, readBlockData, &bufferLen); and write data by: status = mfrc522.MIFARE_Write(blockNum, blockData, 16); However, there's a lot more to it, so check examples of the RFID library, or this external articles: https://www.electronicshub.org/write-data-to-rfid-card-using-rc522-rfid/ https://...


1

Just a SWAG try switching from a UNO to a MEGA the code should work once the decelerations are fixed. What the compiler is not telling you is how much memory is actually used. You have the Heap and Stack etc.


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

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

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

The current may be not enough. Try using extra power supply for Servo Motor


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