Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Raspberry Pi Essentials
  • Table Of Contents Toc
  • Feedback & Rating feedback
Raspberry Pi Essentials

Raspberry Pi Essentials

By : Jack Creasey
3.8 (5)
close
close
Raspberry Pi Essentials

Raspberry Pi Essentials

3.8 (5)
By: Jack Creasey

Overview of this book

Programmers new to the Raspberry Pi and novice programmers with little to no experience with micro board computing will find the book useful. A basic knowledge of programming languages in general will prove useful for a better understanding of the topics.
Table of Contents (10 chapters)
close
close
9
Index

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:

Driving LEDs as output indicators

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...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY