(I installed wiringPi from https://github.com/hardkernel/wiringPi)
As user odroid (not root), if I run:
Code: Select all
gpio export 174 out gpio write 0 1
I would like to write a C (or C++) program to access the GPIO pins (read and write). If I compile the blink.c example from wiringPi, I can run it as root and it will toggle the pin. If I change the program to use wiringPiSetupSys() instead of wiringPiSetup(), I cannot get the output voltage to change. (I do know that I need to run the "gpio export ..." command before executing the program. It still does not work.)
How can I access the GPIO pins from a C/C++ program running as user odroid (i.e. not root)?
Any advice or hints would be much appreciated!