Main Content

Troubleshoot BeagleBone Black GPIO Pins

Error Using writeDigitalPin

Writing a logical value to a pin produces an error:

configureDigitalPin(bbb,'P8_12','input')
writeDigitalPin(bbb,'P8_12',1)

The error states that the pin being written to is configured as an input. To solve this issue:

  • Use a different pin number.

  • Use configureDigitalPin to reconfigure the pin as an output.

Error Using readDigitalPin

Reading the logical value of a pin produces an error:

configureDigitalPin(bbb,'P8_11','output')
readDigitalPin(bbb,'P8_11')

The error states that the pin being read is configured as an output.

To solve this issue, do either of the following:

  • Use a different pin number.

  • Use configureDigitalPin to reconfigure the pin as an input.

Unexpected Digital Pin Number

Using a specific pin number produces an error:

configureDigitalPin(bbb,'P8_27')

The error states that the pin is unavailable for use as a digital pin. It is possible that another interface is using the pin.

To solve this issue, do either of the following:

  • Use the AvailableDigitalPins property to identify which GPIO pins are available, and then use a different pin number.

  • Use the showPins and showAllPins functions to discover how the pin is configured. Restart the BeagleBone® Black hardware to return the pins to their default configuration

Note

The hardware enables HDMI (orange) pins by default. MATLAB® Support Package for BeagleBone Black Hardware does not support HDMI. To disable HDMI, see the BeagleBone Black hardware documentation.

Related Topics