Contents

About the Author

About the Technical Reviewer

Acknowledgments

Introduction

images Chapter 1: Introduction to Sensor Networks

Anatomy of a Sensor Network

Examples of Sensor Networks

The Topology of a Sensor Network

Communication Media

Wired Networks

Wireless Networks

Hybrid Networks

Types of Sensor Nodes

Basic Sensor Nodes

Data Nodes

Aggregator Nodes

Sensors

How Sensors Measure

Storing Sensor Data

Examples of Sensors

Summary

images Chapter 2: Tiny Talking Modules: An Introduction to XBee Wireless Modules

What Is an XBee?

XBee Primer

Choosing XBee Modules

Interacting with an XBee-ZB Module

Pin Layout

Configuring Modules

For More Information

An XBee Wireless Chat Room

Loading the Firmware for the Modules

Capturing Serial Numbers

Configuring the Coordinator

Configuring the Router

Let the Chat Begin

For More Fun

Building an XBee-ZB Mesh Network

Loading the Firmware for the Modules

Configuring the XBee Modules

Forming Test Messages

Testing the Network

For More Fun

Component Shopping List

Troubleshooting Tips and Common Issues

Things to Check

Common Issues

Summary

images Chapter 3: Arduino-Based Sensor Nodes

What Is an Arduino?

Arduino Models

Arduino Clones

So, Which Do I Buy?

Where to Buy

Arduino Tutorial

Learning Resources

The Arduino IDE

Project: Hardware “Hello, World!”

Hosting Sensors with Arduino

Project: Building an Arduino Temperature Sensor

Hardware Setup

Software Setup

Writing the Sketch

Test Execution

Project: Using an Arduino as a Data Collector for XBee Sensor Nodes

XBee Sensor Node

Arduino with XBee Shield

Testing the Final Project

For More Fun

Component Shopping List

Summary

images Chapter 4: Raspberry Pi-based Sensor Nodes

What Is a Raspberry Pi?

Noble Origins

Models

A Tour of the Board

Required Accessories

Recommended Accessories

Where to Buy

Raspberry Pi Tutorial

Getting Started

Installing a Boot Image

Booting Up

GPIO Pin Mapping

Required Software

Project: Hardware “Hello, World!”

Hosting Sensors with Raspberry Pi

Project: Building a Raspberry Temperature Sensor Node

Hardware Setup

Testing the Hardware

Software Setup

Testing the Sensor

For More Fun

Project: Building a Raspberry Barometric Pressure Sensor Node

Hardware Setup

Testing the Hardware

Software Setup

Testing the Sensor

For More Fun

Project: Creating a Raspberry Pi Data Collector for XBee Sensor Nodes

XBee Sensor Node

Hardware

Software

Testing the Final Project

For More Fun

Component Shopping List

Summary

images Chapter 5: Where to Put It All: Storing Sensor Data

Storage Methods

Local Storage Options for the Arduino

Nonvolatile Memory

SD Card

Project: Saving Data in Nonvolatile Memory

Project: Writing Data to an SD Card

Local Storage Options for the Raspberry Pi

Project: Writing Data to Files

Remote Storage Options

Storing Data in the Cloud

Storing Sensor Data in a Database

Component Shopping List

Summary

images Chapter 6: Turning Your Raspberry Pi into a Database Server

What Is MySQL?

Getting Started with MySQL

How and Where MySQL Stores Data

The MySQL Configuration File

How to Start, Stop, and Restart MySQL

Creating Users and Granting Access

MySQL and Python—MySQL Utilities

Building a Raspberry Pi MySQL Server

Partitioning and Formatting the Drive

Setting Up Automatic Drive Mounting

Project: Installing MySQL Server on a Raspberry Pi

Advanced Project: Using MySQL Replication to Back Up Your Sensor Data

Component Shopping List

Summary

images Chapter 7: MySQL and Arduino: United at Last!

Introducing Connector/Arduino

Hardware Requirements

What About Memory?

How to Get MySQL Connector/Arduino

Limitations

Building Connector/Arduino-Enabled Sketches

Database Setup

Setting Up the Arduino

Starting a New Sketch

Testing the Sketch

Troubleshooting Connector/Arduino

MySQL Server Configuration

MySQL User Account Problems

Networking Configuration

Connector Installation

Other

None of These Solved My Problem—What Next?

A Tour of the MySQL Connector/Arduino Code

Library Files

Field Structure

Public Methods

Example Uses

Project: Building a MySQL Arduino Client

Hardware Setup

Software Setup

Setting Up the Sensor Database

Writing the Code

Test Execution

For More Fun

Project Example: Inserting Data from Variables

Project Example: How to Perform SELECT Queries

Displaying a Result Set in the Serial Monitor

Writing Your Own Display Method

Example: Getting a Lookup Value from the Database

Component Shopping List

Summary

images Chapter 8: Building Your Network: Arduino Wireless Aggregator + Wireless Sensor Node + Raspberry Pi Server

Data-Aggregate Nodes

Local-Storage Data Aggregator

Project: Data-Aggregate Node with Local Storage

Remote-Storage Data Aggregator

Project: Arduino Data-Aggregate Node with Database Storage

Project: Raspberry Pi Data-Aggregate Node with Database Storage

Component Shopping List

Summary

images Chapter 9: Planning Wireless Sensor Networks

Sensor Networks Best Practices

Considerations for Data-Aggregate Nodes

Considerations for Sensor Network Databases

Other Considerations

Choosing Sensor Nodes

Wired Or Wireless?

Arduino or Raspberry Pi?

Alternative Hosts

Project: Home Temperature-Monitoring Network

Planning Considerations

Planning the Nodes

Cost Considerations

What About Implementation?

Conclusion

For More Fun

Optional Component Shopping List

Summary

images Appendix: Shopping List

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset