Contents
Chapter 1: Introduction to Sensor Networks
The Topology of a Sensor Network
Chapter 2: Tiny Talking Modules: An Introduction to XBee Wireless Modules
Interacting with an XBee-ZB Module
Loading the Firmware for the Modules
Building an XBee-ZB Mesh Network
Loading the Firmware for the Modules
Troubleshooting Tips and Common Issues
Chapter 3: Arduino-Based Sensor Nodes
Project: Hardware “Hello, World!”
Project: Building an Arduino Temperature Sensor
Project: Using an Arduino as a Data Collector for XBee Sensor Nodes
Chapter 4: Raspberry Pi-based Sensor Nodes
Project: Hardware “Hello, World!”
Hosting Sensors with Raspberry Pi
Project: Building a Raspberry Temperature Sensor Node
Project: Building a Raspberry Barometric Pressure Sensor Node
Project: Creating a Raspberry Pi Data Collector for XBee Sensor Nodes
Chapter 5: Where to Put It All: Storing Sensor Data
Local Storage Options for the Arduino
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
Storing Sensor Data in a Database
Chapter 6: Turning Your Raspberry Pi into a Database Server
How and Where MySQL Stores Data
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
Chapter 7: MySQL and Arduino: United at Last!
How to Get MySQL Connector/Arduino
Building Connector/Arduino-Enabled Sketches
Troubleshooting Connector/Arduino
None of These Solved My Problem—What Next?
A Tour of the MySQL Connector/Arduino Code
Project: Building a MySQL Arduino Client
Setting Up the Sensor Database
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
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
Chapter 9: Planning Wireless Sensor Networks
Sensor Networks Best Practices
Considerations for Data-Aggregate Nodes
Considerations for Sensor Network Databases
Project: Home Temperature-Monitoring Network