diff --git a/MFRC522.py b/MFRC522.py index bcc5fcc..82793dc 100644 --- a/MFRC522.py +++ b/MFRC522.py @@ -103,7 +103,6 @@ class MFRC522: serNum = [] - def __init__(self,spd=1000000): spi.openSPI(speed=spd) GPIO.setmode(GPIO.BOARD) @@ -157,48 +156,54 @@ class MFRC522: self.Write_MFRC522(self.CommIEnReg, irqEn|0x80) self.ClearBitMask(self.CommIrqReg, 0x80) self.SetBitMask(self.FIFOLevelReg, 0x80) + self.Write_MFRC522(self.CommandReg, self.PCD_IDLE); + while(i self.MAX_LEN: - n = self.MAX_LEN - - i = 0 - while i self.MAX_LEN: + n = self.MAX_LEN + i = 0 + while i