O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Raspberry Pi LED Blueprints

Book Description

Design, build, and test LED-based projects using the Raspberry Pi

About This Book

  • Implement real LED-based projects for Raspberry Pi
  • Learn to interface various LED modules such as LEDs, 7-segment, 4-digits 7 segment, and dot matrix to Raspberry Pi
  • Get hands-on experience by exploring real-time LEDs with this project-based book

Who This Book Is For

This book is for those who want to learn how to build Raspberry Pi projects utilising LEDs, 7 segment, 4-digits 7 segment, and dot matrix modules. You also will learn to implement those modules in real applications, including interfacing with wireless modules and the Android mobile app. However, you don't need to have any previous experience with the Raspberry Pi or Android platforms.

What You Will Learn

  • Control LEDs, 7 segments, and 4-digits 7 segment from a Raspberry Pi
  • Expand Raspberry Pi’s GPIO
  • Build a countdown timer
  • Build a digital clock display
  • Display numbers and characters on dot matrix displays
  • Build a traffic light controller
  • Build a remote home light control with a Bluetooth low energy module and Android
  • Build mobile Internet-controlled lamps with a wireless module and Android

In Detail

Blinking LED is a popular application when getting started in embedded development. By customizing and utilising LED-based modules into the Raspberry Pi board, exciting projects can be obtained. A countdown timer, a digital clock, a traffic light controller, and a remote light controller are a list of LED-based inspired project samples for Raspberry Pi.

An LED is a simple actuator device that displays lighting and can be controlled easily from a Raspberry Pi. This book will provide you with the ability to control LEDs from Raspberry Pi, starting from describing an idea through designing and implementing several projects based on LEDs, such as, 7-segments, 4-digits 7 segment, and dot matrix displays.

Beginning with step-by-step instructions on installation and configuration, this book can either be read from cover to cover or treated as an essential reference companion to your Raspberry Pi. Samples for the project application are provided such as a countdown timer, a digital clock, a traffic light controller, a remote light controller, and an LED-based Internet of Things, so you get more practice in the art of Raspberry Pi development.

Raspberry Pi LED Blueprints is an essential reference guide full of practical solutions to help you build LED-based applications.

Style and approach

This book follows a step-by-step approach to LED-based development for Raspberry Pi, explained in a conversational and easy-to-follow style. Each topic is explained sequentially in the process of building an application, and detailed explanations of the basic and advanced features are included.

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

Table of Contents

  1. Raspberry Pi LED Blueprints
    1. Table of Contents
    2. Raspberry Pi LED Blueprints
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Getting Started with LED Programming through Raspberry Pi GPIO
      1. Setting up Raspberry Pi
      2. Introducing Raspberry Pi GPIO
      3. Blinking LEDs
      4. Turning an LED on/off using a push button
      5. Changing color through an RGB LED
      6. Summary
    9. 2. Make Your Own Countdown Timer
      1. Introducing a 7-segment display
      2. Introducing a shift register
      3. Driving a 7-segment display using a shift register
      4. Working with a 4-digit 7-segment display
      5. Building a countdown timer
      6. Summary
    10. 3. Make Your Own Digital Clock Display
      1. Introducing a 4-digit 7-segment display for a digital clock
      2. Introducing an I2C OLED graphic display
        1. Enabling I2C on Raspberry Pi
        2. The I2C library for Python
        3. Displaying numbers and characters
      3. Building a digital clock using an I2C OLED graphic display
      4. Summary
    11. 4. LED Dot Matrix
      1. Introducing LED dot matrix display (8 x 8 LEDs)
      2. Introducing an LED dot matrix driver
        1. Enabling Raspberry Pi SPI
        2. Deploying a matrix 7219 driver
      3. Displaying a random number on the LED dot matrix display
      4. Displaying a random character on the LED dot matrix display
      5. Building a ball reflection game
      6. Cascading LED dot matrix modules
      7. Summary
    12. 5. Building Your Own Traffic Light Controller
      1. Introducing a traffic light controller
      2. Designing a traffic light controller
      3. Controlling AC/DC lamps using channel relay modules
      4. Expanding Raspberry Pi GPIO
      5. Building a traffic light controller
      6. Cascading traffic light controllers
      7. Summary
    13. 6. Building Your Own Light Controller-based Bluetooth
      1. Introducing Bluetooth
      2. Working with Bluetooth using Raspberry Pi
        1. Setting up a Bluetooth USB
        2. Turning on/off Bluetooth
        3. Enabling discoverable
        4. Scanning for Bluetooth Devices
      3. Introducing iBeacon
      4. Bluetooth programming on Android
      5. Building a remote light controller-based Bluetooth
        1. Wiring
        2. Building a program for Raspberry Pi
        3. Building a Bluetooth app for Android
        4. Testing
      6. Summary
    14. 7. Making Your Own Controlled Lamps Through Internet Network
      1. Connecting the Raspberry Pi to a network
        1. Connecting to a wired network
        2. Connecting to a wireless network
      2. Introducing Node.js
      3. Controlling LEDs and lamps using Node.js
      4. Building a simple web server using Node.js
      5. Building RESTful using Node.js
      6. Controlling LEDs through RESTful
      7. Building a PhoneGap application for Android
      8. Connecting PhoneGap Android to Raspberry Pi through RESTful
      9. Summary
    15. Index