Tuesday, 12 February 2013

GPIO Install / Configuration Code

Below was the code used to download, install and configured the GPIO ports which allows us to program the GPIO ports using the official Raspberry Pi programming language - Python.

First open the "LX Terminal" which can be found at the desktop and then enter the following code:

sudo apt-get update
# downloads the latest updates #
sudo apt-get install git
# install specific update, the software: git #

git clone https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git
# collect a collection of codes from this website directory using the software just installed: git #
cd Adafruit-Raspberry-Pi-Python-Code
# enter into that directory #
ls
# confirm #

When prompted to confirm, enter "Y"

Exit LX Terminal before opening it again and enter:

sudo apt-get update
# downloads the latest updates #
sudo apt-get install python-dev
# install specific update, Python Development Toolkit #
sudo apt-get install python-rpi.gpio
#  install specific update, which allows us to program the GPIO ports in Python #

When prompted to confirm, enter "Y"

The GPIO were setup and configured, ready to be commanded by programming each port using Python.

No comments:

Post a Comment