Skip to Main Content
Raspberry Pi Cookbook, 4th Edition
book

Raspberry Pi Cookbook, 4th Edition

by Simon Monk
December 2022
Beginner to intermediate content levelBeginner to intermediate
618 pages
12h 41m
English
O'Reilly Media, Inc.
Book available
Content preview from Raspberry Pi Cookbook, 4th Edition

Chapter 17. The Internet of Things

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

17.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 17-1 shows the breadboard layout for this.

Figure 17-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 Recipes 10.10 and 10.11). You can plug these directly into the ...

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, 3rd Edition

Raspberry Pi Cookbook, 3rd Edition

Simon Monk
bash Cookbook, 2nd Edition

bash Cookbook, 2nd Edition

Carl Albing, JP Vossen
Getting Started With Arduino, 4th Edition

Getting Started With Arduino, 4th Edition

Massimo Banzi, Michael Shiloh

Publisher Resources

ISBN: 9781098130916Errata PageSupplemental Content