Skip to content

Commit

Permalink
Merge pull request #7 from OthmanEmpire/develop
Browse files Browse the repository at this point in the history
Fixed bug where LED on physical Pi would not blink (permissions)
  • Loading branch information
othmanalikhan authored Oct 24, 2019
2 parents c8d4989 + 59b561f commit 4351801
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions aroundtheclock/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def main():

# Initialising LED
if led:
logging.info("Initialising Raspberry Pi pin: {}".format(CONFIG["pin"]))
pin = led.initialisePi(CONFIG["pin"])

######################################## SCHEDULING
Expand Down
8 changes: 7 additions & 1 deletion bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ source ./virtual/bin/activate
yes | pip install -r requirements_python.txt

echo -e "\n>>> CREATING AN AROUNDTHECLOCK DAEMON USER"
sudo useradd -r aroundtheclock -s /bin/false
if [ "$(getent group gpio)" ]; then
# 'gpio' group is needed to access GPIO pins as non-root
sudo useradd -r aroundtheclock -g gpio -s /bin/false
else
# Otherwise create a user but no access to pins for LED
sudo useradd -r aroundtheclock -s /bin/false
fi

echo -e "\n>>> INSTALLING AROUNDTHECLOCK AS A DAEMON..."
PATH_SRC=./config/aroundtheclock.service
Expand Down

0 comments on commit 4351801

Please sign in to comment.