This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
user:hlongwe1:portfolio:datacommproject1 [2013/09/24 18:29] – created hlongwe1 | user: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. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | The following code will get us to the point were our LED can be turned on, and then off. | ||
+ | < | ||
+ | sudo su | ||
+ | echo 11 > / | ||
+ | echo out > / | ||
+ | </ | ||
+ | |||
+ | To turn on the LED we run the following command | ||
+ | < | ||
+ | echo 1 > / | ||
+ | </ | ||
+ | {{: | ||
+ | |||
+ | And then to turn off the LED we run the command, | ||
+ | < | ||
+ | echo 0 > / | ||
+ | </ | ||
+ | {{: | ||