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, see BeagleBone 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 write
1 to a GPIO pin, the pin outputs
+3.3V. When you write
0 to the pin, or do not
write anything, the pin is grounded, and outputs
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, around
0V, the logical
value of the pin is
0. If the input voltage is higher, approximately
+3.3V, the logical value of the pin is
To change a pin that you have already configured as input or output, use
configureDigitalPin. 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.