Skip to Content
Raspberry Pi Hacks
book

Raspberry Pi Hacks

by Ruth Suehle, Tom Callaway
December 2013
Intermediate to advanced
394 pages
9h 43m
English
O'Reilly Media, Inc.
Content preview from Raspberry Pi Hacks

Chapter 6. Extend Your Pi

The real magic of the Raspberry Pi happens when you make it a part of something else. Use the GPIO to connect it to new devices ([Hack #56]). Connect Arduino shields ([Hack #58]). Add a tiny screen ([Hack #57]), numeric keypad ([Hack #60]), or heat sink ([Hack #61]). Do all of them, and make something amazing. This chapter is to help get you started taking the Pi beyond mere Linux computer into something more.

Hack 56. Control GPIO from a Web Browser

Your Raspberry Pi GPIO interface is a gateway to an entire Internet of Things. Here is a simple way to access it from a web browser.

Every day, more and more devices become network-aware, either intentionally or as a result of clever hacks. This phenomenon has many names, but the most common seems to be “Internet of Things.” You can use your Raspberry Pi to help your dumb devices get smart and join the Internet of Things.

The best way to connect your Pi to other devices is via the GPIO expansion ports. If you’re not sure what that means, go take a quick read through [Hack #14]. These digital pins will let you wire almost anything into your Raspberry Pi, but once the physical connection is made, you’ll want a framework in place to actually do something.

Eric PTAK created a REST framework and web app to control the Raspberry Pi and its GPIO through the Web. Called WebIOPi, this framework allows you to use and control your Pi’s GPIO over the Internet (or through a number of language bindings and APIs).

To install it, ...

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

Mastering the Raspberry Pi

Mastering the Raspberry Pi

Warren W. Gay
Raspberry Pi 3 Home Automation Projects

Raspberry Pi 3 Home Automation Projects

Shantanu Bhadoria, Ruben Oliva Ramos

Publisher Resources

ISBN: 9781449362737ErrataSupplemental Content