Merge pull request #51 from Marek2k17/patch-1

replace number with variable
This commit is contained in:
Mario Gómez 2018-03-20 09:15:12 -06:00 committed by GitHub
commit d219b1a402
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,7 +130,7 @@ class MFRC522:
def __init__(self, dev='/dev/spidev0.0', spd=1000000): def __init__(self, dev='/dev/spidev0.0', spd=1000000):
spi.openSPI(device=dev,speed=spd) spi.openSPI(device=dev,speed=spd)
GPIO.setmode(GPIO.BOARD) GPIO.setmode(GPIO.BOARD)
GPIO.setup(22, GPIO.OUT) GPIO.setup(NRSTPD, GPIO.OUT)
GPIO.output(self.NRSTPD, 1) GPIO.output(self.NRSTPD, 1)
self.MFRC522_Init() self.MFRC522_Init()