mattjlewis / diozero

Java Device I/O library that is portable across Single Board Computers and microcontrollers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos / Pico. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
https://www.diozero.com
MIT License
261 stars 59 forks source link

Support IRQ triggering for more efficient MFRC22 tag reading #190

Open Ramblurr opened 8 months ago

Ramblurr commented 8 months ago

(this is a feature request)

The python rfid scanner library pi-rc522 has a really cool feature.

Instead of constantly polling for rfid tags to appear, you can call rfid.wait_for_tag(timeout). It uses an IRQ pin to receive an interrupt when an rfid tag has appeared.

This is quite handy, and would be nice to have in diozero.

mattjlewis commented 7 months ago

Thanks, will take a look - lots of improvements to be made to my MFRC522 implementation...