From e181278df5d85c42d9bf9c9c45a93b1fa3d387a5 Mon Sep 17 00:00:00 2001 From: Ondrej Mikle Date: Thu, 24 Jul 2014 16:14:22 +0200 Subject: [PATCH] Pin numbering changed to GPIO scheme. --- brmdoor_nfc.config.sample | 2 +- unlocker.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/brmdoor_nfc.config.sample b/brmdoor_nfc.config.sample index cc71b47..ce6b46f 100644 --- a/brmdoor_nfc.config.sample +++ b/brmdoor_nfc.config.sample @@ -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 diff --git a/unlocker.py b/unlocker.py index e7fcf54..08dbaa5 100644 --- a/unlocker.py +++ b/unlocker.py @@ -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