I have just begun writing some C++ programs for my pi(s) and am making use of GPIO's for activating a line of relays.
Since I want the program to run as non-root, I figured I could use wiringPi's export functionality.
Therefore I have this script which exports the GPIOs which I need
Code: Select all
for pin in 4 17 10 9 25 8 7 11; do
/usr/local/bin/gpio export $pin out
done
I haven't been able to find a way where the export command does not force the exported output low.
I could set the output high immediately after, but it still triggers the relay briefly.
Am I missing something or is this a bug in wiringPi?
PS. I also tried controlling the I/O's using low-level C (OUT_GPIO). This requires root-access, but does not set the output low when initialising.
