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

Multi Reader Wiegand Protocol Library for Arduino
18 stars 3 forks source link

Use Arduino's native External Interrupts function. #6

Closed TwoPrusTwo closed 10 months ago

TwoPrusTwo commented 10 months 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 10 months ago

Duplicate issue #3

jpliew commented 10 months 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.