This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Use the Raspberry Pi™’s GPIO pins


raspiConnection to Raspberry Pi board


configurePinConfigure GPIO pin as digital input, digital output, or PWM output
readDigitalPinRead logical value from GPIO input pin
writeDigitalPinWrite logical value to GPIO output pin
showPinsShow diagram of GPIO pins

Examples and How To

Use the Raspberry Pi GPIO Pins as Digital Inputs and Outputs

This example shows how to use the digital pins on the Raspberry Pi hardware as digital inputs and outputs.


The Raspberry Pi GPIO Pins

GPIO Pins on Raspberry Pi Hardware


Troubleshoot Raspberry Pi GPIO Pins

Troubleshoot GPIO Pins on Raspberry Pi Hardware

Featured Examples