GPIO on Radxa

Power on blue led

echo default-on > /sys/class/leds/blue/trigger

Power off

echo none > /sys/class/leds/blue/trigger

Header J8

12
34
56
7 OUT8
9 IN10
1112
namenpinheader
0_A71677J8
0_B11699J8
PWM228511J8

Input on pin 169 (GPIO0_B1) (pin n°9 su J8)

# input on pin 9
echo 169 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio169/direction
echo rising > /sys/class/gpio/gpio169/edge
cat /sys/class/gpio/gpio169/value
 
# output on pin 7
echo 167 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio167/direction
 
# on
echo 1 > /sys/class/gpio/gpio167/value
 
# off
echo 0 > /sys/class/gpio/gpio167/value