Blink a series of LEDs using Python Programming Language and Raspberry Pi using Raspberry

Overview of Steps

In the first phase, I will install only one LED. Next, I download the LED class python module that represent one hardware LED. I will run the LED class python module to blink that LED. The first phase serves as a “Proof of Concept”.

Blink a series of LEDs using Python Programming Language and Raspberry Pi

In the second phase, I will install another 4 LEDs. Finally, I run the python main module to create a series of five sequentially blinking LEDs as depicted in the video above

Step 1: Materials

Gather the following materials:

1 Raspberry Pi device running on standard Raspbian Linux installation
5 LEDs rated at 2.4V

5 Resistor (can be between 185 Ohms to 270 Ohms)

1 breadboard

6 Female to Male Jumper Wire

5 single-core wire (also called solid wires, solid-core or single-strand wire, consists of one piece of metal wire. Solid wire is useful for wiring breadboards. I stripped an unused telephone wire to get the single-core wire. There are 4 thin insulated single-core wire in a telephone cable. Choose any one and strip the insulator off just enough to expose bare metal at the two ends.)

Step 2: Installing the first LED

WARNINGBe careful when installing the LED with the Raspberry Pi as it may short-circuit and damage Raspberry Pi device. Do this at your own risk. Remove all power supply source from your Raspberry Pi device.

MaterialsThe following materials are required:

1 X Raspberry Pi
1 x LED

1 X 165 Ohm Resistor

2 X Male-Female Jumper Wire

1 X 5cm single core wire 1 X Breadboard

Installation

Blink a series of LEDs using Python Programming Language and Raspberry Pi
  1. Read to the GPIO diagram to locate the pins.
  2. Connect female end of jumper wire to the GPIO Pin 11. (This pin will be programmed to supply 3.3 Volts)
  3. Connect male end of jumber wire to the breadboard as shown in video.
  4. Connect resistor to breadboard as show in video.
  5. Connect LED to breadboard as shown in video.
  6. Connect the single-core wire as shown in video
  7. Connect female end of another jumper wire to GPIO Pin 6 (This pis is at 0 Volts.)

 

For more detail: Blink a series of LEDs using Python Programming Language and Raspberry Pi


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top