# Inconsistent GPIO values on Beaglebone Black running Debian

I'm trying to use GPIO on my Beaglebone Black, but I'm running into some behavior I don't understand. I have two pins (gpios 27 and 61) configured to input with active_low set to 0. There is nothing connected to either pin (or any pin on the board for that matter), but one of the pins (gpio 61) is showing a value of 1 while gpio 27 shows a value of 0.

Can anyone explain why this is happening?

Here are the exact steps I took to get this result:

echo 27 > /sys/class/gpio/export
echo 61 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio27/direction
echo in > /sys/class/gpio/gpio61/direction
cat /sys/class/gpio/gpio27/value
0
cat /sys/class/gpio/gpio27/active_low
0
cat /sys/class/gpio/gpio61/value
1
cat /sys/class/gpio/gpio61/active_low
0

• Without anything connected to a general purpose input the value is undefined or in other words floating and can take on the value of high or low. To combat this, normally pull-up or pull-down resistors are used either externally or internally. – DigitalNinja Apr 15 '16 at 22:57
• DigitalNinja is correct. You should not rely on a CMOS input to have one value or the other when nothing is connected to it. – The Photon Apr 15 '16 at 23:01
• – CL. Apr 16 '16 at 8:53