Book Image

Raspberry Pi LED Blueprints

By : Agus Kurniawan
Book Image

Raspberry Pi LED Blueprints

By: Agus Kurniawan

Overview of this book

Table of Contents (14 chapters)
Raspberry Pi LED Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building a remote light controller-based Bluetooth


In Chapter 5, Building Your Own Traffic Light Controller, we already developed a traffic light controller. However, we controlled the lamps/LEDs directly from an internal app in Raspberry Pi. In this section, we will build an app that controls actuator or sensor devices on Raspberry Pi remotely via Bluetooth.

For testing, we will use three LEDs as actuator devices, which are controlled from the Android app via the Bluetooth module. We will use the HC-06 Bluetooth serial device, and the price is cheap. This module uses a Universal Asynchronous Receiver/Transmitter (UART) to send and receive a Bluetooth packet. You can get this module from eBay, Amazon, or your local electronics store:

Wiring

To build our demo, we need the following hardware:

  • A Raspberry Pi board

  • An HC-06 Bluetooth serial

  • Three LEDs

  • Cables

The following is the hardware wiring:

  • The HC-06 TX is connected to Raspberry Pi RX

  • The HC-06 RX is connected to Raspberry Pi TX

  • The HC-06 GND is...