Raspberry Pi – Using the GPIO…

Part 1:

Here is how to use your Raspberry Pi’s GPIO pins… Part 1. Make sure to watch Part 2:

EDIT: I apologise for the quality of the video, as well as the quality of my tutorial; this was one of my early tutorials and as you can see I was not very experienced at all! Please have a look at some of my later videos, the quality of them is a lot higher!

Commands used:

sudo apt-get install python-rpi.gpio

And if needed:

sudo apt-get install python-dev

Code is as follows (Be careful though the indentation may be wrong!):

import RPi.GPIO as gpio
import time

#set up pin 14 as an output
gpio.setup(14, gpio.OUT)

#Make an LED flash on and off forever
while True:
gpio.output(14, gpio.HIGH)
gpio.output(14, gpio.LOW)

Happy Piing!

Part 2:

2 comments on “Raspberry Pi – Using the GPIO…
  1. Gerhard says:

    Thanks man, exactly what I needed. Got my flashy light nicely with my recently procured Pi2.

  2. Md Abul Bashar Sarkar says:

    Hi, I already made voice recognition system using C# and according to voice command I want to operate LED ON and LED off.

    From this tutorial you used python command and control LED flashing using python program.

    Now my question is…It is possible to operate LED ON and OFF using C# command and C# voice recognition system?

    Please give me answer.

Leave a Reply to Gerhard Cancel reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.