Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can do it both ways. You can directly access the pins from your program with C++. The other approach is to write a node that uses topics or services to access or set the pins. For reference you can look at these resources from the wiki:

Writing a Simple Service and Client (C++)

Writing a Simple Publisher and Subscriber (C++)

I don't know how you are managing permissions on your robot, but for me to access GPIO on my Beaglebone, I just made sudo passwordless and then when my node launched, I chmodded the /dev/class/gpio folder to allow my user to access it. Hope this helps! luketheduke