gpio17 is an LED on th7
Sp gpo27 chosen to active IR leds instead.
This commit is contained in:
parent
d9d3e32df0
commit
1c23b53add
@ -1,18 +1,18 @@
|
|||||||
|
|
||||||
# take a picture.
|
# take a picture.
|
||||||
# First turn on IR LEDS
|
# First turn on IR LEDS
|
||||||
# GPIO17 is the ground side of the IR leds, so setting it to 0 turns them on
|
# GPIO27 is the ground side of the IR leds, so setting it to 0 turns them on
|
||||||
# Note this is through a 220 Ohm resdistor limiting the current to about 10 mA
|
# Note this is through a 220 Ohm resdistor limiting the current to about 10 mA
|
||||||
if [ -d /sys/class/gpio/gpio17 ]; then
|
if [ -d /sys/class/gpio/gpio27 ]; then
|
||||||
echo " gpio17 already exists "
|
echo " gpio27 already exists "
|
||||||
else
|
else
|
||||||
echo 17 > /sys/class/gpio/export
|
echo 27 > /sys/class/gpio/export
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
# turn on the IR leds
|
# turn on the IR leds
|
||||||
echo out > /sys/class/gpio/gpio17/direction
|
echo out > /sys/class/gpio/gpio27/direction
|
||||||
echo 0 > /sys/class/gpio/gpio17/value
|
echo 0 > /sys/class/gpio/gpio27/value
|
||||||
|
|
||||||
|
|
||||||
export d=`date`
|
export d=`date`
|
||||||
@ -22,4 +22,4 @@ export picname=`echo $d | sed 's/ /_/g' | sed 's/:/_/g' `
|
|||||||
libcamera-jpeg -o /home/robin/Pictures/$picname.jpg -t 2000 --width 1200 --height 1000
|
libcamera-jpeg -o /home/robin/Pictures/$picname.jpg -t 2000 --width 1200 --height 1000
|
||||||
|
|
||||||
# turn off IR LEDS
|
# turn off IR LEDS
|
||||||
echo 1 > /sys/class/gpio/gpio17/value
|
echo 1 > /sys/class/gpio/gpio27/value
|
||||||
|
Loading…
Reference in New Issue
Block a user