ondryaso / pi-rc522

Raspberry Pi Python library for SPI RFID RC522 module
MIT License
412 stars 150 forks source link

The library reads two times the module and one is wrong #7

Open acien101 opened 8 years ago

acien101 commented 8 years ago

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