Open NamoDev opened 4 years ago
Can you please try the following tests one by one
wg ---> reader 1 connect to 14, 15
wg2 ---> reader 2 connect to 17,18
wg ---> reader 1 connect to 14, 15 wg2 ---> reader 2 connect to 17,18 Only scan at reader 1 all the time
wg ---> reader 1 connect to 14, 15 wg2 ---> reader 2 connect to 17,18 Only scan at reader 2 all the time
let me know the result, I might need rewrite the code.
@jpliew Here are the results:
Only reader 1 connected to pins 14/15 Reader 1 is a cheap 26-bit reader bought off Amazon
Ready...
WG2 Bits=26
RAW Binary=10111000100011111101100101
WG Bits=26
RAW Binary=10111000100011111101100101
WG2 Bits=26
RAW Binary=10111000100011111101100101
WG Bits=26
RAW Binary=10111000100011111101100101
Only reader 2 connected to pins 17/18 Reader 2 is a HID iCLASS SE RK40 reader (Wiegand with keypad)
WG2 Bits=32
RAW Binary=01111010000110100100011100000100
WG Bits=32
RAW Binary=01111010000110100100011100000100
WG2 Bits=4
RAW Binary=0101
WG2 Bits=4
RAW Binary=1000
Both readers connected, only reader 1 is scanned all the time
WG2 Bits=26
RAW Binary=01000111011100000010011010
WG Bits=26
RAW Binary=01000111011100000010011010
WG Bits=26
RAW Binary=01000111011100000010011010
WG Bits=26
RAW Binary=01000111011100000010011010
Both readers connected, only reader 2 is scanned all the time
WG2 Bits=32
RAW Binary=01111010000110100100011100000100
WG Bits=32
RAW Binary=01111010000110100100011100000100
WG2 Bits=32
RAW Binary=01111010000110100100011100000100
WG2 Bits=32
RAW Binary=01111010000110100100011100000100
Ok, I will work on a fix. I think this is a bug.
hi, thx for your great work, is it possible to use 3 readers in Arduino uno now?
@rassaifred not yet. Arduino attachInterrupt is preventing the whole the ISR in the object. There are many discussion about this for other library. I need to workout a better way to handle this.
https://www.google.com/search?client=firefox-b-d&q=arduino+attachinterrupt+in+class
@NamoDev @rassaifred multiple instances support https://github.com/jpliew/Multi-Reader-Wiegand-Protocol-Library-for-Arduino
Hello,
I recently tried this library out and would say it's perhaps one of the nicest I've seen. Works perfectly with most types of readers, including HID iCLASS SE readers :)
Right now I could handle one Wiegand device on a single Arduino just fine. However, I would like to be able to handle two independent readers on the same Arduino (in this case, an Arduino Nano Every with interrupt support on all pins) and it seems that I have ran into a little snag.
If I modify the example code to be:
It seems that the Arduino would not be able to correctly indicate from which instance a read has occured (with a read from the same keypad, sometimes it'd say it's from
wg
, sometimes it'd say it's fromwg2
). Is this a problem with the library, or am I instantiating it incorrectly in this case?Thank you!