-1

enter image description here

am interfacing EM-18 rfid reader to raspberry pi 3 through USB. The data has being rotating left by one bit, each time when I read the data

closed as unclear what you're asking by Aurora0001, Milliways, Dmitry Grigoryev, Patrick Cook, Steve Robillard May 8 '18 at 5:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 6
    DO NOT post images post text – Milliways Apr 27 '18 at 8:28
0

The data.read(12) always reads exactly 12 bytes from the serial interface - if the sent card id is longer or shorter it will mess up the next read.

If its always off by one on the next read, you probably need 13 bytes here - but it would be more robust to read until a certain character (eg. \n newline)

Not the answer you're looking for? Browse other questions tagged or ask your own question.