Hi Everyone,
I've connected my Arduino Uno to a Priority1Design RFID reader (Wiegand extender module [WIEG-EXT] - $54.00 : Priority 1 Design, Electronics design and manufacturing). I have the rfid reader's TX connected to pin 8 and the reader's RX connected to pin 9.
when a tag is read, I get the following in DEC:
99 172 22 125 155 159 159 159 145 155 149 145 143 143 155 229 0
whereas the actual tag ID is:
9 8 1 0 2 0 0 0 7 2 5 7 8 8 2
What I have tried so far:
- The baud rate of the reader is 9600, which I have established in my program.
2)I discovered that RX and TX (0,1) on the Arduino are connected to USB, and since I have the Arduino connected to my computer and the RFID reader this may cause a problem. Which is why I have the reader connected to pins 8 and 9. - I am using AltSoftSerial instead of SoftwareSerial because I read that the old library may have timing issues.
One thing that is interesting to note is that in the tag ID, the 4th and 6th/7th/8th characters should be the same. Oddly, this is not the case with the ID as read by the reader. In addition, in changing the serial COM from softwareserial to altsoftserial, the ID read was slightly different.
Here is my code:
#include <AltSoftSerial.h>
AltSoftSerial mySerial;
void setup()
{
Serial.begin(4800);
mySerial.begin(9600);
}
void loop() // run over and over
{
for( ; ; )
{
if (mySerial.available() > 0)
{
Serial.println(mySerial.read());
}
delay(200);
}
}
Any help would be greatly appreciated.
Austin