Permalink
Browse files

Added comments

  • Loading branch information...
achilleusD committed May 11, 2016
1 parent 7694029 commit 7433163094076de271f1ae6748c49124c994914d
Showing with 13 additions and 9 deletions.
  1. +13 −9 on
22 on
@@ -1,4 +1,6 @@
#!/bin/bash
# Piget Documentation
if [ $# -ge 2 ] || [[ $1 == "--help" ]] || [ $(id -u) -ne 0 ];then
/show/messagebox "$0"
/show/info "[beta] [gpio] [led] [electronics]"
@@ -7,13 +9,15 @@ if [ $# -ge 2 ] || [[ $1 == "--help" ]] || [ $(id -u) -ne 0 ];then
/show/example "$0 21"
exit 1
else
if [ $# -eq 1 ];then
ledPin=$1
/show/listecho "Turn on LED $ledPin" $OK
/do/led/python/onoff.py $ledPin 1
else
/show/gpio
/show/listecho "Could you tell me where the led is plugged ?" $WARN
exit 314
fi
#If there is an argument (led gpio)
if [ $# -eq 1 ];then
ledPin=$1
/show/listecho "Turn on LED $ledPin" $OK #Display text
/do/led/python/onoff.py $ledPin 1 #Turn on led
else
/show/gpio #Display GPIO
/show/listecho "Could you tell me where the led is plugged ?" $WARN
exit 314
fi
fi

0 comments on commit 7433163

Please sign in to comment.