Kalyax
2 years ago
10 changed files with 17 additions and 21 deletions
@ -0,0 +1 @@ |
|||||
|
test.php |
@ -0,0 +1,6 @@ |
|||||
|
<?php |
||||
|
$light = $_GET["light"]; |
||||
|
$output = null; |
||||
|
exec('bash ../scripts/get_light.sh '.$light, $output); |
||||
|
var_dump($output); |
||||
|
?> |
@ -1,6 +1,6 @@ |
|||||
<?php |
<?php |
||||
$light = $_POST["light"]; |
$light = $_POST["light"]; |
||||
$output = null; |
$output = null; |
||||
exec('bash ../scripts/led.sh '.$light, $output); |
exec('bash ../scripts/set_light.sh '.$light, $output); |
||||
var_dump($output); |
var_dump($output); |
||||
?> |
?> |
@ -0,0 +1,4 @@ |
|||||
|
#!/bin/bash |
||||
|
gpio mode $1 out |
||||
|
let "out=`gpio read $1`" |
||||
|
echo $out |
@ -1,13 +0,0 @@ |
|||||
#!/bin/bash |
|
||||
echo $1 |
|
||||
gpio mode $1 out |
|
||||
let "out=`gpio read $1`" |
|
||||
echo $out |
|
||||
if [ $out = 1 ] |
|
||||
then |
|
||||
gpio write $1 0 |
|
||||
echo 0 |
|
||||
else |
|
||||
gpio write $1 1 |
|
||||
echo 1 |
|
||||
fi |
|
@ -0,0 +1,5 @@ |
|||||
|
#!/bin/bash |
||||
|
gpio mode $1 out |
||||
|
let "out=`gpio read $1`" |
||||
|
gpio write $1 $out |
||||
|
echo $out |
@ -1 +0,0 @@ |
|||||
0 |
|
@ -1,5 +0,0 @@ |
|||||
<?php |
|
||||
$out = null; |
|
||||
exec("scripts/get_temp.sh", $out); |
|
||||
var_dump($out); |
|
||||
?> |
|
@ -1 +0,0 @@ |
|||||
0 |
|
Loading…
Reference in new issue