diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2b0fc6c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +test.php \ No newline at end of file diff --git a/api/get_light.php b/api/get_light.php new file mode 100644 index 0000000..1be95bb --- /dev/null +++ b/api/get_light.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/api/temp.php b/api/get_temp.php similarity index 100% rename from api/temp.php rename to api/get_temp.php diff --git a/api/set_light.php b/api/set_light.php index 1dccee8..2d8bb44 100644 --- a/api/set_light.php +++ b/api/set_light.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/scripts/get_light.sh b/scripts/get_light.sh new file mode 100755 index 0000000..c4a1b1f --- /dev/null +++ b/scripts/get_light.sh @@ -0,0 +1,4 @@ +#!/bin/bash +gpio mode $1 out +let "out=`gpio read $1`" +echo $out diff --git a/scripts/led.sh b/scripts/led.sh deleted file mode 100755 index 6449958..0000000 --- a/scripts/led.sh +++ /dev/null @@ -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 diff --git a/scripts/set_light.sh b/scripts/set_light.sh new file mode 100755 index 0000000..0f13e3a --- /dev/null +++ b/scripts/set_light.sh @@ -0,0 +1,5 @@ +#!/bin/bash +gpio mode $1 out +let "out=`gpio read $1`" +gpio write $1 $out +echo $out diff --git a/scripts/toto b/scripts/toto deleted file mode 100644 index 573541a..0000000 --- a/scripts/toto +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/test.php b/test.php deleted file mode 100644 index 61147d4..0000000 --- a/test.php +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/toto b/toto deleted file mode 100644 index 573541a..0000000 --- a/toto +++ /dev/null @@ -1 +0,0 @@ -0