Skip to Content
Raspberry Pi Cookbook, 3rd Edition
book

Raspberry Pi Cookbook, 3rd Edition

by Simon Monk
October 2019
Beginner to intermediate
608 pages
11h 41m
English
O'Reilly Media, Inc.
Content preview from Raspberry Pi Cookbook, 3rd Edition

Chapter 16. The Internet of Things

16.0 Introduction

The Internet of Things (IoT) is the rapidly growing network of devices (things) connected to the internet. That doesn’t just mean more and more computers using browsers, but actual appliances and wearable and portable technology. This includes all sorts of home automation, from smart appliances and lighting to security systems and even internet-operated pet feeders, as well as lots of less practical but fun projects.

In this chapter, you learn how your Raspberry Pi can participate in the IoT in various ways.

16.1 Controlling GPIO Outputs Using a Web Interface

Problem

You want to control general-purpose input/output (GPIO) outputs using a web interface to your Raspberry Pi.

Solution

Use the bottle Python web server library (Recipe 7.17) to create an HTML web interface to control the GPIO port.

To make this recipe, you will need the following:

Figure 16-1 shows the breadboard layout for this.

F1400
Figure 16-1. The breadboard layout controlling GPIO outputs from a web page

An alternative to using a breadboard is to attach a Raspberry Squid and Squid Button (see Recipe 9.10 and Recipe 9.11). You can plug these directly into ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Raspberry Pi Cookbook, 4th Edition

Raspberry Pi Cookbook, 4th Edition

Simon Monk
Arduino Cookbook, 3rd Edition

Arduino Cookbook, 3rd Edition

Michael Margolis, Brian Jepson, Nicholas Robert Weldin

Publisher Resources

ISBN: 9781492043218Errata PageSupplemental Content