Beaglebone GPIO always return 1

I'm trying to get a button to work on my Beaglebone. I bought MAKE Volume 32 and tried to follow the guide in there.

But when I read the GPIO pin, do I always get 1. I also tried to disconnect everything and is still got 1 from that pin.

I tried to read the value using the file systen as following

echo 70 > /sys/class/gpio/export

cd /sys/class/gpio/gpio70

echo in > direction

cat value


Here is my setup.

The resistor is a 10k resistor and the button is a arcade push button from Adafruit.

• What are the pins on the beaglebone? Mar 11 '13 at 22:47
• Your commands to export, setup the direction, and read the pin is correct. Can you see the voltage changing with a DMM? Are you sure you are using the correct pin? Another way of checking your hardware is to remove your button, change the pin direction to an out and see if you can change the voltage (echo 1>value echo 0>value) on the button GPIO connection. Mar 11 '13 at 22:56
• I tried connecting a led and I got that blinking. The strange thing is that even after I disconnected everything, it still returned the value one. I wonder if I am doing it wrong on my diagram, can I be frying my gpios or would they not be able to output then? Mar 12 '13 at 7:47

The pin has pullup, so when the switch pulls it to ground instead of 3.3v it functions well with the pullup. Before it was pulled to power and I was connecting it to power, so there was no measured difference.

• Thanks of the edit. Now I better understand how pullup works :D Mar 20 '13 at 10:29
• How did you determine it had a pullup? I cannot find a good GPIO chart for the Beaglebone Black.
– taco
May 13 '13 at 20:36
• When i checked the pin without connecting anything to the gpio, and it still retured one. I asked a friend of mine who is a Electronic engineer and he suggested that it pulled up the value. May 14 '13 at 7:25