abobija / esp-idf-rc522

C library for interfacing ESP32 with MFRC522 RFID card reader, packaged as ESP-IDF component
MIT License
127 stars 36 forks source link

Use interrupts instead of hot idling #36

Open danielbuechele opened 7 months ago

danielbuechele commented 7 months ago

Currently, when waiting for a tag, the task is put to sleep for 100ms and then activated again. The MFRC522 module has a IRQ pin and we could use an interrupt when the tag is present.

abobija commented 7 months ago

Hi @danielbuechele

Thank you for the comment. I recall from past research that implementing interrupt-driven tag detection with the MFRC522 can be challenging due to certain limitations, so I initially opted for polling. I will revisit the details to assess if there's a viable way to integrate interrupt handling in the current setup.