Merge branch 'master' of https://github.com/wybczu/MFRC522-python into wybczu-master

This commit is contained in:
Mario Gomez 2014-07-18 20:07:38 -06:00
commit cfc76a6036
4 changed files with 17 additions and 5 deletions

3
Dump.py Executable file → Normal file
View file

@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf8 -*-
import RPi.GPIO as GPIO
import MFRC522
import signal

7
MFRC522.py Executable file → Normal file
View file

@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf8 -*-
import RPi.GPIO as GPIO
import spi
import signal
@ -104,8 +107,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)

3
Read.py Executable file → Normal file
View file

@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf8 -*-
import RPi.GPIO as GPIO
import MFRC522
import signal

3
Write.py Executable file → Normal file
View file

@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf8 -*-
import RPi.GPIO as GPIO
import MFRC522
import signal