Pin numbering changed to GPIO scheme.

This commit is contained in:
Ondrej Mikle 2014-07-24 16:14:22 +02:00
parent 2d5f02573f
commit e181278df5
2 changed files with 2 additions and 1 deletions

View file

@ -20,4 +20,4 @@ unlocker = UnlockerWiringPi
# Config for wiringPi-based unlocker
# lock_pin - which pin needs to be pulled high to disengage the lock
[UnlockerWiringPi]
lock_pin = 18
lock_pin = 17

View file

@ -29,6 +29,7 @@ class UnlockerWiringPi(Unlocker):
def __init__(self, config):
Unlocker.__init__(self, config)
wiringpi.wiringPiSetupGpio() # pin numbers follow P1 GPIO header
self.lockPin = self.config.getint("UnlockerWiringPi", "lock_pin")
wiringpi.pinMode(self.lockPin, 1) #output