Browse Source

3.141592653589793238

master
BARRAUX Arthur 2 years ago
parent
commit
576a526671
  1. 0
      api/get_light.php
  2. 4
      api/set_light.php
  3. 0
      assets/index.62d9ce6a.js
  4. 0
      assets/index.8b2241a3.css
  5. 0
      index.html
  6. 10
      scripts/set_light.sh

0
api/get_light.php

4
api/set_light.php

@ -2,5 +2,5 @@
$light = $_GET["light"];
$output = null;
exec('bash ../scripts/set_light.sh '.$light, $output);
var_dump($output);
?>
echo $output[0];
?>

0
assets/index.62d9ce6a.js

0
assets/index.8b2241a3.css

0
index.html

10
scripts/set_light.sh

@ -1,5 +1,11 @@
#!/bin/bash
gpio mode $1 out
let "out=`gpio read $1`"
gpio write $1 $out
echo $out
if [ $out = 0 ]
then
gpio write $1 1
echo 1
else
gpio write $1 0
echo 0
fi

Loading…
Cancel
Save