Merge branch 'master' into master

This commit is contained in:
Mario Gómez 2018-03-20 09:21:51 -06:00 committed by GitHub
commit 65ebda1f39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 275 additions and 2 deletions

View file

@ -1,5 +1,25 @@
#!/usr/bin/env python
# -*- coding: utf8 -*-
#
# Copyright 2014,2018 Mario Gomez <mario.gomez@teubi.co>
#
# This file is part of MFRC522-Python
# MFRC522-Python is a simple Python implementation for
# the MFRC522 NFC Card Reader for the Raspberry Pi.
#
# MFRC522-Python is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# MFRC522-Python is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with MFRC522-Python. If not, see <http://www.gnu.org/licenses/>.
#
import RPi.GPIO as GPIO
import spi
@ -110,7 +130,7 @@ class MFRC522:
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.setup(NRSTPD, GPIO.OUT)
GPIO.output(self.NRSTPD, 1)
self.MFRC522_Init()