Kalyax 2 years ago
parent
commit
11706db469
  1. 0
      scripts/Test extension RPI.py
  2. 4
      scripts/get_temp.sh
  3. 6
      scripts/led.sh
  4. 0
      scripts/temp.sh

0
scripts/Test extension RPI.py

4
scripts/get_temp.sh

@ -13,5 +13,5 @@ else
upper_byte=$((upper_byte & 0x0F)) upper_byte=$((upper_byte & 0x0F))
let "temperature = ($upper_byte*100 * 16 + $lower_byte*100 / 4096)" let "temperature = ($upper_byte*100 * 16 + $lower_byte*100 / 4096)"
fi fi
printf %.2f "$(($temperature))e-2" # printf %.2f "$(($temperature))e-2"
echo echo $temperature > toto;

6
scripts/led.sh

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

0
scripts/temp.sh

Loading…
Cancel
Save