Hey everyone, I am part of a group of 5 students developing a platform utilizing the BBB and a series of external buttons as controls for a sort of trivia game for the elderly which may lack the somewhat precise motor skills required to work off a standard tablet. We decided to build this app as an android app. This has went relatively smoothly until now, We are trying to figure out how to utilize the GPIO of the BBB and buttons to work with the app. the wiring is not an issue i can make whatever pin needs to be made what do it. its the code and more software side we are having issues with. Can anyone aid in this? i have done some research on it thus far and see that each of the GPIO pins we would like to use need to be exported in the sys/class/gpio directory. but beyond this we do not have much of an idea.
Any help you can provide would greatly be appreciated.
If you whant persistent pin muxing changes on the BBB you must change the device tree overlay!!!.
To check if its work in general us the adb shell.
An example for the p8.09:
./adb shell
cd /sys/class/gpio
echo 69 > export //creates gpio69 directory for the gpio access
chmode 777 gpio // to get access for the apk. the apk is never running as root.
cd gpio69
chmod 777 value
chmode 777 direction
you can change the direction and value by
echo 1 > value // set gpio high
echo out > direction // set gpio as output