This commit is contained in:
xdrm-brackets 2017-02-20 23:05:35 +01:00
parent 012a46da61
commit b8f7051285
3 changed files with 7 additions and 4 deletions

View File

@ -68,14 +68,17 @@
foreach($g_state as $pinIndex=>$pinValue){
// {1} set value to LOW if 0 //
if( $pinValue == 0 )
if( $pinValue == 0 ){
if( syscall(SOURCE_DIR."/lib/gpio/low ".$g_pins[$pinIndex]) == false )
return 127;
// {2} set value to HIGH if not 0 //
else
}else{
if( syscall(SOURCE_DIR."/lib/gpio/high ".$g_pins[$pinIndex]) == false )
return 127;
}
}

View File

@ -32,7 +32,7 @@ test -d /sys/class/gpio/gpio$1 || echo $1 > /sys/class/gpio/export;
# [4] Set mode to OUT
#========================================================#
echo 1 > /sys/class/gpio/gpio$1/value;
echo "1" > /sys/class/gpio/gpio$1/value;

View File

@ -32,7 +32,7 @@ test -d /sys/class/gpio/gpio$1 || echo $1 > /sys/class/gpio/export;
# [4] Set mode to OUT
#========================================================#
echo 0 > /sys/class/gpio/gpio$1/value;
echo "0" > /sys/class/gpio/gpio$1/value;