Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Internet of Things Programming with JavaScript

You're reading from   Internet of Things Programming with JavaScript Get the best out of Arduino and Raspberry Pi Zero to develop Internet of Things projects using JavaScript

Arrow left icon
Product type Paperback
Published in Feb 2017
Publisher Packt
ISBN-13 9781785888564
Length 298 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ruben Oliva Ramos Ruben Oliva Ramos
Author Profile Icon Ruben Oliva Ramos
Ruben Oliva Ramos
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Getting Started with Raspberry Pi Zero FREE CHAPTER 2. Connecting Things to the Raspberry Pi Zero 3. Connecting Sensors - Measure the Real Things 4. Control-Connected Devices 5. Adding a Webcam to Monitor Your Security System 6. Building a Web Monitor and Controlling Devices from a Dashboard 7. Building a Spy Police with the Internet of Things Dashboard 8. Monitoring and Controlling Your Devices from a Smart Phone 9. Putting It All Together

Controlling outputs with Raspberry Pi via Bluetooth

Things go a different route as soon as you’re trying to communicate with other electronic gadgets that uses Bluetooth modules connected to the serial port of the Raspberry Pi.

These modules are very cheap to buy, the actual module is the green board that sits on the breakout board in my model. The pure HC-05 will only work on 3.3V levels, not with 5V-TTL-levels. So one would need level shifters (again).

In this section, we will communicate the Raspberry Pi Zero to the Bluetooth module, and connect the pins TX and RX of the Raspberry Pi.

First, we need to configure the file of the system to make some changes in order to activate the communication of the Raspberry Pi Zero TX and RX:

Controlling outputs with Raspberry Pi via Bluetooth

Controlling lights from an Android Application

We need to download the Bluetooth Terminal, as shown in the following screenshot:

Controlling lights from an Android Application

The following screenshot shows the results of sending the numbers 1, 2, 3, 4, 5, and 6:

Controlling lights from an Android Application

The following image shows the final part of...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image