Follow @endyourif rss Facebook LinkedIn

Traffic Light Sequence with the Raspberry Pi

Published on Dec 14, 2015

I recently blogged about setting up my Raspberry Pi to use the GPIO on my OpenELEC operating system. Once I got it set up, it was time to create my first project. The basic project that is demonstrated on the official Raspberry Pi site is to light up an LED (light emitting diode). I used this basic tutorial to get it up and running and followed these coding instructions to light it up.

I didn't have any LEDs or a breadboard, so I purchased this starter kit from Sunfounder. The kit contains a lot of other great parts and tutorials to create more complex projects that I'm hoping to do in the near future.

After I had the first LED working, it was time to advance the project and apply what I had learned with one LED to many. To keep it simple, I began by adding two additional LEDs (yellow and green).

Setting up RPi.GPIO with OpenELEC

Published on Dec 7, 2015

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.