LED - Let there be light
Last updated
Last updated
In this activity you will connect a Light Emitting Diode (LED) to your Raspberry Pi's GPIO (General Purpose Input Output) Pins.
Warning!
Make sure your circuit on your breadboard is not connected to your Pi
Double check you circuit before you connect it to your Pi
After you have created the circuit you need to write a simple Pyhon program controlling the LED state being on or off.
Your program will introduce the concepts:
importing modules
setting GPIO pins
variables
user input from screen
Electronics:
One LED
Breadboard
Male to Female Breadboard Wires
The model Raspberry Pi we use is the Pi 3 Model B V1.2. Older models are compatible with our programs and electronic diagrams provided you use GPIO.Board
for the pin numbering.
The LED has to be connected in the right way. The electricity can only flow one way through a diode and a LED (a Light Emitting Diode). For the sake of this activity we assume the flow of electricity is from positive to negative. For a more correct explanation look at this article in WikipediA.
The anode (+) is the larger pin on the LED and the cathode (-) is the shorter pin. Also on the housing of LED is a flat part on the rim on the side of the cathode.
Pin 11 will supply the 3.3 volts to the LED when activated in your Python program.
Pin 6 is the ground pin completing the circuit when Pin 11 is turned on.
Make sure your Pi is turned off from the power when you connect the LED circuit to your Pi!
Check the circuit before connecting the Pi to the power
The five holes on a Terminal Strip are connected.
Please note!:
The four Power Rails are separate and NOT inter-connected.
All Terminal Strips are separate and NOT inter-connected.
The Terminal Strips are NOT connected across the Divider
The Divider is used for IC chips and to straddle parts such as switches, LEDs and chips.
This site provides a more detailed explanation on the use of a breadboard.
The vertical holes on each side of the breadboard are the Power Rails. There are four Power Rails. The holes on each Rail are connected.