Making Things Talk
Third Edition
Tom Igoe
Making Things Talk
by Tom Igoe
Copyright 2017 Maker Media, Inc. All rights reserved. Printed in Canada.
Published by Maker Media, Inc.
1700 Montgomery Street, Suite 240, San Francisco, CA 94111
Maker Media books may be purchased for educational, business, or sales promotional use.
You can send comments and questions to us by email at .
Print History
September 2007
First Edition
September 2011
Second Edition
August 2017
Third Edition
Editor: Patrick Di Justo
Proofreader: Elizabeth Welch
Cover Designer: Tom Igoe
Production Editor: Maureen Forys, Happenstance Type-O-Rama
Book Production: Jeff Lytle, Happenstance Type-O-Rama
Indexer: Valerie Perry, Happenstance Type-O-Rama
Cover Photograph: Tom Igoe
The Make logo and Maker Media logo are registered trademarks of Maker Media, Inc. The MAKE: Projects series designations, Making Things Talk , and related trade dress are trademarks of Maker Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Maker Media, Inc. was aware of the trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
Please note: Technology, and the laws and limitations imposed by manufacturers and content owners, are constantly changing. Thus, some of the projects described may not work, may be inconsistent with current laws or user agreements, or may damage or adversely affect some equipment.
Your safety is your own responsibility, including proper use of equipment and safety gear, and determining whether you have adequate skill and experience. Power tools, electricity, and other resources used for these projects are dangerous unless used properly and with adequate precautions, including safety gear. Some illustrative photos do not depict safety precautions or equipment, in order to show the project steps more clearly. These projects are not intended for use by children.
Use of the instructions and suggestions in Making Things Talk is at your own risk. Maker Media, Inc., disclaims all responsibility for any resulting damage, injury, or expense. It is your responsibility to make sure that your activities comply with applicable laws, including copyright.
ISBN: 978-1-68045-215-0
[TI] 2017-07-21 First Release
to Frank Igoe
who showed me the potential of computers
and to Red Burns
who showed me their potential to benefit humans
Making Things Talk
MAKE: PROJECTS
Preface
A few years ago, Neil Gershenfeld wrote a smart book called When Things Start to Think. In it, he discussed a world in which everyday objects and devices are endowed with computational power: in other words, today. He talked about the implications of devices that exchange information about our identities, abilities, and actions. Its a good read, but I think he got the title wrong. I would have called it When Things Start to Gossip, becauselets face iteven the most exciting thoughts are worthwhile only once you start to talk to someone else about them. Making Things Talk teaches you how to make things that have computational power talk to each other, and about giving people the ability to use those things to communicate.
For a couple of decades now, computer scientists have used the term object-oriented programming to refer to a style of software development in which programs and subprograms are thought of as objects. Like physical objects, they have properties and behaviors. They inherit these properties from the prototypes from which they descend. The canonical form of any object in software is the code that describes its type. Software objects make it easy to recombine objects in novel ways. You can reuse a software object if you know its interface the collection of properties and methods to which its creator allows you access (as well as the documents so that you know how to use them). It doesnt matter how a software object does what it does, as long as it does it consistently. Software objects are most effective when theyre easy to understand and when they work well with other objects.
In the physical world, were surrounded by all kinds of electronic objects: clock radios, toasters, mobile phones, music players, childrens toys, and more. It can take a lot of work and a significant amount of knowledge to make a useful electronic gadgetit can take almost as much knowledge to make those gadgets talk to each other in useful ways. But that doesnt have to be the case. Electronic devices can beand often arebuilt up from simple modules. As long as you understand the interfaces, you can make anything from them. Think of it as object-oriented hardware . Understanding the ways in which things talk to each other is central to making this work, regardless of whether the object is a toaster, an email program on your laptop, or a networked database. All of these objects can be connected if you can figure out how they communicate. This book is a guide to some of the tools for making those connections.
X
Who This Book Is For
This book is written for people who want to make things talk to other things. Maybe youre a science teacher who wants to show your students how to monitor weather conditions at several locations around your school district simultaneously, or a sculptor who wants to make a whole room of choreographed mechanical sculptures. You might be an industrial designer who needs to be able to build quick mockups of new products, modeling both their forms and their functions. Maybe youre a cat owner, and youd like to be able to play with your cat while youre away from home. This book is a primer for people with little technical training and a lot of interest. This book is for people who want to get projects done.
The main tools in this book are personal computers, web servers, and microcontrollers, the tiny computers inside everyday appliances. Over the past decade, microcontrollers and their programming tools have gone from being arcane items to common, easy-to-use tools. Elementary school students are using the tools that baffled graduate students only a decade ago. During that time, my colleagues and I have taught people from diverse backgrounds (few of them computer programmers) how to use these tools to increase the range of physical actions that computers can respond to, sense, and interpret.
In recent years, theres been a rising interest among people using microcontrollers to make their devices not only sense and control the physical world, but also talk to other things about what theyre sensing and controlling. If youve built something with a Basic Stamp or a Lego Mindstorms kit, and want to make that thing communicate with things you or others have built, this book is for you. It is also useful for software programmers familiar with networking and web services who want an introduction to embedded network programming.
Next page