How can I set a GPIO pin in Rock 3A?

Hi! I found this https://wiki.radxa.com/Rock3/hardware/3a/gpio, and tried the steps listed at the bottom, but trying to run echo 153 > export I get this error: -bash: export: Permission denied, and I get it even using sudo. Any ideas? Also, is there a way to do this with code? Like with Python or something?

sudo su
echo 153 > /sys/class/gpio/export

1 Like

The sudo cannot pass the permissions to I/O redirection (> <). You can use pipe and tee instead the >, like that:

echo 153 | sudo tee /sys/class/gpio/export

1 Like