I am running a Ubuntu system on my Radxa Zero 3E (single board computer)
Using its GPIO I am driving a 5V LED via an NPN transisitor. Everything works.
For switching it on I use gpioset $(gpiofind PIN_36)=1 & for off gpioset $(gpiofind PIN_36)=0
My question is I cannot run above commands as a single line like sudo gpioset $(gpiofind PIN_36)=0 I must first move to root terminal via sudo su & then commands work perfectly.
The other alternative is that I use x2 separate sudo one liners first for gpiofind & then for gpioset. Both Binaries are located in /usr/bin
gpiofindexpects to be run as root, and yoursudoinvocation doesn't.sudo suif you want to ping me in /dev/chat.