Electronic – Why is P9_14 GPIO input using Adafruit’s library giving me -1227689624 on the BeagleBone Black

beaglebone blackgpio

I know I should really be writing my own GPIO libraries so I know how they work and can fix them when they break, but for now I am following a simple tutorial using Adafruit's GPIO library, which I have successfully installed.

Note that in the command line output below I am using P9_14 instead of P9_12 (shown in Adafruit's photo below), but both gave the same result when I tried them. I have tried rebooting the Beaglebone, same result. Connecting GND to P9_14 gave no change. Connecting GND to P8_14 gave no change (thinking maybe Adafruit mixed up their connector labels). Connecting 3.3V to P9_14, or 3.3V to P8_14 gave no change.

Any ideas?

enter image description here

enter image description here

Also note below that the Adafruit Tutorial is listing the wrong pin to use, it should be P9 not P8, according to the photo in their own tutorial.

enter image description here

Best Answer

That photo of the pin names is wrong. P9 is the one closest to the power jack. Look at your bbb, it has P9 and P8 printed at the end of the headers. If the photo of the bbb connected to a breadboard is yours then your input is connected to P8.12