Last active
August 22, 2023 12:11
-
-
Save TiNredmc/bbe6ad56a5a85d00a34b44c0830795c8 to your computer and use it in GitHub Desktop.
Orange Pi Prime and Orange Pi Zero 3 UDEV rule for GPIO on Armbian 23.05.1 Jammy or Orange Pi OS (Ubuntu)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Don't forget to "sudo groupadd gpio" and "sudo usermod -aG gpio $USER" | |
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 660 /sys/class/gpio/export /sys/class/gpio/unexport'" | |
SUBSYSTEM=="gpio", KERNEL=="gpio*", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment