Some help on beaglebone GPIO

Folks, i am really confused. Have you guys ever had issues when writing to the GPIO? For example i am trying to turn on an LED that is connected to each GPIO. Some GPIOs work as expected, while others simple refuse to acknowledge my commands.

In particular am trying to turn on an LED at GPIO1_6, since this is on bank #1 and pin #6, the GPIO number is 1*32+6 = 38. In the command line I insert the following sequence of commands and it works as expected.

echo ${NUMBER} > /sys/class/gpio/export

ls /sys/class/gpio/
ls /sys/class/gpio/gpio${NUMBER}

echo “high” > /sys/class/gpio/gpio${NUMBER}/direction
delay 1
echo “low” > /sys/class/gpio/gpio${NUMBER}/direction
delay 1

echo ${NUMBER} > /sys/class/gpio/unexport

I can change the number to 45 which will blink GPIO1_13, 47 will blink GPIO1_15, 62 will blink GPIO1_30. However, the system does not respond when I attempt to blink GPIO1_2 (NUMBER=34) and a bunch of other GPIOS such as GPIO1_4, GPIO1_0.
Do you guys have any ideas or suggestions?

the problem is due to your muxing options. in order to set a pin to a “high” or “low” state, you have to first set its “muxing” option to be an output pin. in order to do this you have to navigate to “/sys/kernel/omap_mux/gpmc_ad6” and echo a “7” into it. This website explains muxing a whole lot better than i.
hope that helps!

Excellent link! It works great. Thank you very much!