User Tools

Site Tools


user:hlongwe1:portfolio:datacommproject1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
user:hlongwe1:portfolio:datacommproject1 [2013/09/24 18:45] – [Procedure] hlongwe1user:hlongwe1:portfolio:datacommproject1 [2013/09/24 18:52] (current) – [Procedure] hlongwe1
Line 1: Line 1:
 +======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.
 +
 +{{:user:hlongwe1:portfolio:img_8724.jpg?100|}}
 +
 +The following code will get us to the point were our LED can be turned on, and then off.
 +<code>
 +sudo su
 +echo 11 > /sys/class/gpio/export 
 +echo out > /sys/class/gpio/gpio11/direction
 +</code>
 +
 +To turn on the LED we run the following command
 +<code>
 +echo 1 > /sys/class/gpio/gpio11/value
 +</code>
 +{{:user:hlongwe1:portfolio:img_1671.jpg?100|}}
 +
 +And then to turn off the LED we run the command,
 +<code>
 +echo 0 > /sys/class/gpio/gpio11/value
 +</code>
 +{{:user:hlongwe1:portfolio:img_6374.jpg?100|}}