Raspberry Pi- Using the GPIO... Part 2 @TheRaspberryPiGuy
Raspberry Pi- Using the GPIO... Part 2  @TheRaspberryPiGuy
Uploaded September 2012 | Updated September 2026, 1 week ago
Here is how to use your Raspberry Pi's GPIO pins... Part 2... Make sure to watch Part 1 first:

youtube.com/watch?v=H08BLCuhaxg

Commands used:

sudo apt-get install python-rpi.gpio

And if needed:

sudo apt-get install python-dev

Code is as follows:

import RPi.GPIO as gpio
import time

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

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

INDENTATION IS WRONG... Everything in the while loop MUST be 4 spaces in or 1 tab....

Happy Piing!

Please subscribe and tell you friends of my videos!
Raspberry Pi- Using the GPIO... Part 2Raspberry Pi - Interview with Clive - EducationNEW Raspberry Pi Official Display - 7 Touchscreen!Raspberry Pi - Python Basics - Episode 1 - Part 2 of 2...Raspberry Pi - How to install and play Quake 3...Four years of Pi!The Tandy MultiFace...The Raspberry Pi Guy, STEM & the future - ARM 25th Anniversary Guest SpeechRaspberry Pi Robots - Basic Motor Control - Episode 1Make your Raspberry Pi artificially intelligent! - Amazon Alexa Personal Assistant TutorialRaspberry Pi - Reading Analogue inputs - Part 1 of 2What is Raspberry Pi? - Five years of Pi!
TheRaspberryPiGuy |

Raspberry Pi- Using the GPIO... Part 2

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER