Merge pull request #1 from Manuel83/master

Update
This commit is contained in:
swimIan
2017-07-15 23:33:22 -07:00
committed by GitHub
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -13,12 +13,13 @@ class Buzzer(object):
def __init__(self, gpio):
try:
cbpi.app.logger.info("INIT BUZZER NOW GPIO%s" % gpio)
self.gpio = gpio
self.gpio = int(gpio)
GPIO.setmode(GPIO.BCM)
GPIO.setup(gpio, GPIO.OUT)
GPIO.setup(self.gpio, GPIO.OUT)
self.state = True
cbpi.app.logger.info("BUZZER SETUP OK")
except Exception as e:
cbpi.app.logger.info("BUZZER EXCEPTION %s" % str(e))
self.state = False
def beep(self):