Hello
I am trying to make an RFID card reader using the RMD6300 module, which sends bytes to the ESP8266 over the UART. The whole byte reading goes without a problem, I wait for a byte of value 2 starting the data transfer and on receiving a byte of value 3 I terminate the reading.
The problem is that the RMD6300, when an RFID card is applied to it, does the reading several times. As many times as it reads the card it sends 14 bytes each.
The correct reading occurs after the first data transfer, but because the read buffer of the serial port has charged to probably 64 bytes, the reading loops several times.
Where can I reduce the number of bytes of the Serial Port read buffer? I remember doing something like this once before, it was written in some library and the value was 64 bytes. I can't find it, and I would just like to limit this value to 14 bytes. Or maybe there is an option to:
1. read the RFID card code
2. wait a second
3. erase the remaining contents of the read buffer
I am trying to make an RFID card reader using the RMD6300 module, which sends bytes to the ESP8266 over the UART. The whole byte reading goes without a problem, I wait for a byte of value 2 starting the data transfer and on receiving a byte of value 3 I terminate the reading.
The problem is that the RMD6300, when an RFID card is applied to it, does the reading several times. As many times as it reads the card it sends 14 bytes each.
The correct reading occurs after the first data transfer, but because the read buffer of the serial port has charged to probably 64 bytes, the reading loops several times.
Where can I reduce the number of bytes of the Serial Port read buffer? I remember doing something like this once before, it was written in some library and the value was 64 bytes. I can't find it, and I would just like to limit this value to 14 bytes. Or maybe there is an option to:
1. read the RFID card code
2. wait a second
3. erase the remaining contents of the read buffer