RPi.GPIO

If you are a Python user, you can program GPIOs with API provided by RPi.GPIO.

RPi.GPIO is a module to control Raspberry Pi GPIO channels. This package provides a class to control the GPIO on a Raspberry Pi. For examples and documents, visit http://sourceforge.net/p/raspberry-gpio-python/wiki/Home/.

Test whether RPi.GPIO is installed or not, type in python:

python
_images/image93.png

In Python CLI, input “import RPi.GPIO”, If no error prompts, it means RPi.GPIO is installed.

import RPi.GPIO
_images/image94.png

Then, type in RPi.GPIO.VERSION to check its version.

RPi.GPIO.VERSION
_images/image95.png

If you want to quit python CLI, type in:

exit()
_images/image95-1.png