diff --git a/MFRC522.py b/MFRC522.py index 30575bf..b18d0ff 100755 --- a/MFRC522.py +++ b/MFRC522.py @@ -104,8 +104,8 @@ class MFRC522: serNum = [] - def __init__(self,spd=1000000): - spi.openSPI(speed=spd) + def __init__(self,dev='/dev/spidev0.0',spd=1000000): + spi.openSPI(device=dev,speed=spd) GPIO.setmode(GPIO.BOARD) GPIO.setup(22, GPIO.OUT) GPIO.output(self.NRSTPD, 1) @@ -390,4 +390,4 @@ class MFRC522: self.Write_MFRC522(self.TxAutoReg, 0x40) self.Write_MFRC522(self.ModeReg, 0x3D) - self.AntennaOn() \ No newline at end of file + self.AntennaOn()