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
1 | 2 |
3 | 4 |
5 | 6 |
7 OUT | 8 |
9 IN | 10 |
11 | 12 |
name | n | pin | header |
---|---|---|---|
0_A7 | 167 | 7 | J8 |
0_B1 | 169 | 9 | J8 |
PWM2 | 285 | 11 | J8 |
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