E
Size: a a a
E
З
З
E
E
E
Example
In this example we will use GPIO29 and use it as a switch.
With latest linux kernels you may need to first get the gpio base
cat /sys/class/gpio/gpiochip*/base | head -n1
200
and sum the base to your GPIO:
200 + 29 = 229
Now first step is making GPIO available in Linux:
echo "229" > /sys/class/gpio/export
then you need to decide if it will be input or output, as we will use it as a switch so we need output
echo "out" > /sys/class/gpio/gpio229/direction
and last line turns GPIO on or off with 1 or 0:
echo "1" > /sys/class/gpio/gpio229/value
З
E
З
E
З
E
E
З
З
E
З
x
З
З