Helping you solve those tough coding problems!

Setting up RPi.GPIO with OpenELEC Setting up RPi.GPIO with OpenELEC

Published on Dec 7, 2015 by Jamie Munro

I bought a Raspberry Pi a while ago and setup OpenELEC so I could use it as a media library. Just recently I decided I wanted to have some fun with the GPIO on the Pi.

The examples all looked quite simple when it was assumed the RPi.GPIO was already installed. However, with OpenELEC being a media center first and an OS second, it was a little more involved.

I did end up getting it working and here is how I did it:

1. Install the OpenELEC unofficial addons repository.

2. Once installed, add the RPi.GPIO package from the Tools section.

3. In your Python code, before importing, include the directory where the RPi.GPIO is installed:

import sys

4. Follow one of the many great tutorials from Raspberry Pi.

Tags: Python | Raspberry Pi | python | rpi.gpio | raspberry pi

My Books
ASP.NET MVC 5 With Bootstrap and Knockout.js
Knockout.js Building Dynamic Client-Side Applications
20 Recipes for Programming MVC 3
20 Recipes for Programming PhoneGap
Rapid Application Development with CakePHP