ondryaso / pi-rc522

Raspberry Pi Python library for SPI RFID RC522 module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The library reads two times the module and one is wrong

acien101 opened this issue · comments

The code is from the readMe:

rdr = RFID.RFID()
while True:
  (error, tag_type) = rdr.request()
  if not error:
    print ("Tag detected")
    (error, uid) = rdr.anticoll()
    if not error:
      print("1")
      rdr.stop_crypto()
    else:
        print("0")
  else:
      print("0")

and the output is something like this
OUTPUT:
0
0
0
0
0
0
1
0
1
0
1
0
1
0
0
0
0
0