Table of Contents

Access to GPIO

Find below the prerequisites to access the GPIO. If not installed yet, first install the version control system:

# apt-get install git-core

Python

To be able to access the GPIO, the Python Integrated Development Environment must run as root. First, copy the desktop link IDLE to something like IDLE GPIO. Right click on the icon and open the link with Leafpad, then modify the following 2 lines:

Name=IDLE GPIO
Exec=gksudo /usr/bin/idle

Run the shell and create a new file with the following content:

import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(25, GPIO.OUT)
GPIO.output(25, 1)
time.sleep(5)
GPIO.output(25, 0)
GPIO.cleanup()

This will light an LED connected to GPIO 25 for 5 seconds.

WiringPi

cd to your home directory, then:

$ git clone git://git.drogon.net/wiringPi
$ cd wiringPi
$ ./build

RCSwitch

cd to your home directory, then:

$ git clone https://github.com/r10r/rcswitch-pi.git
$ cd rcswitch-pi
$ make

Raspberry-remote

Find the zip file on xkonni's Raspberry-remote site and follow the instructions given. This will setup a basic php application to allow switching sockets. Note the following: