jpliew / Multi-Reader-Wiegand-Protocol-Library-for-Arduino

Multi Reader Wiegand Protocol Library for Arduino
20 stars 4 forks source link

Use Arduino's native External Interrupts function. #6

Closed TwoPrusTwo closed 1 year ago

TwoPrusTwo commented 1 year ago

Arduino now supports attaching interrupts natively.

Could you please change attachPinChangeInterrupt to attachInterrupt in lines 51 and 52 of WiegandMulti.cpp?

This will make this library compatible with more devices as it no longer relies on the PCINT library. I have tested the modified code on an Adafruit ItsyBitsy m0 (SAMD21).

I could create a pull request if given permission.

TwoPrusTwo commented 1 year ago

Duplicate issue #3

jpliew commented 1 year ago

Hi @TwoPrusTwo , thanks for your suggestion.

I just checked on https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/ seems like for Uno, only 2 and 3 are support with attachInterrupt.

With PCINT library, more pins are supported even for Uno.