Main Content

The BeagleBone Black GPIO Pins

Dedicated GPIO pins are shaded in green. Other pins are shared among the GPIO, PWM, Serial, SPI, and I2C interfaces. Enabling or disabling the SPI and I2C interfaces changes the availability of specific pins for use as GPIO pins. For more information about shared pins, seeBeagleBone Black Pin Map.

You can configure a GPIO pin as an input or output. If a pin is unconfigured, reading from the pin configures it as an input. Writing to the pin configures it as an output.

When you write1to a GPIO pin, the pin outputs+3.3V. When you write0to the pin, or do not write anything, the pin is grounded, and outputs0V.

When you read the GPIO pin, the BeagleBone Black hardware detects the voltage of the pin. If the input voltage has approximately the same voltage as ground, around0V销的,逻辑值0. If the input voltage is higher, approximately+3.3V销的,逻辑值1.

To change a pin that you have already configured as input or output, useconfigureDigitalPin. The BeagleBone Black hardware requires this extra step to help prevent accidental damage to the board and other components. For example, you can burn out an input pin that is connected to ground by writing to it.