Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #1

Merged
merged 6 commits into from
Jul 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ show_menu () {
fi
;;
10)
confirmAnswer "Are you sure you want to reboo the Raspberry Pi?"
confirmAnswer "Are you sure you want to reboot the Raspberry Pi?"
if [ $? = 0 ]; then
sudo reboot
else
Expand Down
5 changes: 3 additions & 2 deletions modules/buzzer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down