User Tools

Site Tools


user:hlongwe1:portfolio:datacommproject1

LED Command Line Approach

The first project for Data Communications by Harry Longwell during the FAll 2013.

Objectives

The purpose of this project was to create make a LED turn on and off using a command line approach.

Procedure

The first step of the project is to connect an LED to the Raspberry Pi's pins, for this project I used pin GPIO 11. This set up is shown in the photo found below.

The following code will get us to the point were our LED can be turned on, and then off.

sudo su
echo 11 > /sys/class/gpio/export 
echo out > /sys/class/gpio/gpio11/direction

To turn on the LED we run the following command

echo 1 > /sys/class/gpio/gpio11/value

And then to turn off the LED we run the command,

echo 0 > /sys/class/gpio/gpio11/value

user/hlongwe1/portfolio/datacommproject1.txt · Last modified: 2013/09/24 18:52 by hlongwe1