Reader small image

You're reading from  Raspberry Pi Essentials

Product typeBook
Published inApr 2015
Publisher
ISBN-139781784396398
Edition1st Edition
Right arrow
Author (1)
Jack Creasey
Jack Creasey
author image
Jack Creasey

Jack Creasey has been in the technology industry for more than 30 years, the last 15 years as a Senior Program Manager in hardware and software design. His expertise includes designing, developing, and teaching IT courseware. He is an avid inventor and holds 13 patents in hardware and software design. After retiring early from the computing industry, Jack avidly participates in social network groups that share his passion for next generation technology solutions.
Read more about Jack Creasey

Right arrow

Driving LEDs as output indicators


LED indicators can take many forms, from a single LED indicator through to complex LED X-Y arrays and digit displays. If you have multiple indicator LEDs, it is preferable to include an LED driver and even better to offload this to an I2C controller, which we will explain in Chapter 6, Driving I2CPeripherals on the Raspberry Pi. If you have just a few LEDs to drive and are short of output pins for each LED, you will want to read up on Charlieplexing as a way of reducing the port count required (http://en.wikipedia.org/wiki/Charlieplexing).

For our demo, we will use a single LED attached to a single GPIO port. We will attach it to the GPIO 26 port with a series resistor to limit the current through the device. This is what your breadboard should look like, along with the schematic:

When the GPIO pin number 26 is high, the LED is off, and when it is low, a current of approximately 4 mA flows from the 3.3V supply through the LED and into the GPIO pin to the ground...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Raspberry Pi Essentials
Published in: Apr 2015Publisher: ISBN-13: 9781784396398

Author (1)

author image
Jack Creasey

Jack Creasey has been in the technology industry for more than 30 years, the last 15 years as a Senior Program Manager in hardware and software design. His expertise includes designing, developing, and teaching IT courseware. He is an avid inventor and holds 13 patents in hardware and software design. After retiring early from the computing industry, Jack avidly participates in social network groups that share his passion for next generation technology solutions.
Read more about Jack Creasey