logo资料库

Building Wireless Sensor Networks Using Arduino.pdf

第1页 / 共249页
第2页 / 共249页
第3页 / 共249页
第4页 / 共249页
第5页 / 共249页
第6页 / 共249页
第7页 / 共249页
第8页 / 共249页
资料共249页,剩余部分请下载后查看
Building Wireless Sensor Networks Using Arduino
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
eBooks, discount offers, and more
Questions
1. A World without Wires
XBee radio hardware
XBee product families
Versions and variants
Official XBee documentation
Your first transmission
Using the SparkFun XBee Explorer USB
Getting and running XCTU
Updating the firmware
Failed firmware updates
Configuration
Talking to the XBee module
Receiving data
Uploading the sketch
Connecting the XBee
Receiving data
Switching to API mode
First module in API mode
Sending data
Second module in API mode
Starting and joining a network
Module addressing
Network scanning and remote configuration
The Commissioning button and LEDs
Making your network secure
Distributing the network key
Trust center link key
Trust center terminology differences
Selecting encryption keys
Setting up your secure network
Disabling network joining
Other XBee families
Configuration values
Summary
2. Collecting Sensor Data
Hardware setup
Serial on XBee
Handshaking signals
Voltage levels
Serial on a computer
Serial on Arduino
XBee shields
Other shields
Software setup
Example sketches
Variable types
PROGMEM and F() strings
Pointers
Serial port setup
The xbee-arduino library
Creating the sketch
Sending and receiving data
Sending data
The ZBTxRequest objects
Creating the sketch
Blocking and polling
Running the sketch
Callbacks
Callback types
Callback limitations
Receiving data
The ZBRxResponse objects
Creating the sketch
Collecting sensor data
Reading a DHT22 sensor
Handling packets using binary.h
Building and sending a packet
Constructing a packet using binary.h
Creating the sketch
Receiving and parsing a packet
Parsing a packet using binary.h
Creating the sketch
Troubleshooting
Communication with the XBee module is not working
Modules are not joining the network
Modules cannot talk to each other
Summary
3. Storing and Visualizing Your Data
Storing your data in the cloud
Introducing Beebotte
Channels and resources
Security
Access protocols
Sending your data to Beebotte
Preparing Beebotte
Connecting your Arduino to the Internet
Writing the sketch
Visualizing your data
Accessing your data
Keeping your data locally
Sending data over the serial port
Receiving data over the serial port
Summary
4. Controlling the World
Controlling your heating and/or cooling system
Replacing the thermostat
Controlling mains power
Hairdryer – an alternative
Control systems
Adding setpoint control
Subscribing to events
Reading events
Remembering sensor readings
Thermostat controller
Controlling a relay
Controlling off-the-shelf ZigBee devices
ZigBee profiles, endpoints, and clusters
ZigBee public profiles
Selecting a ZigBee device
Talking to a ZigBee on/off device
Joining the network
Factory reset in case of problems
Discovering services
The ZBExplicitTxRequest objects
Sending a message
The ZBExplicitRxResponse objects
Receiving messages
Receiving on/off command responses
More ZigBee features
Summary
5. Standalone XBee Operation
Creating a window sensor
Connecting things
Powering the module
Connecting the window sensor
I/O pin naming
Configuring the XBee module
Remotely sampling the pins
Querying the pin state
Automatically sending the sample data
The configuration values
Receiving the samples on the coordinator
The ZBRxIoSampleResponse objects
Receiving the I/O samples
Creating a standalone relay
Connecting things
Configuring the XBee module
Remotely toggling an output pin
Summary
6. Battery Power and Sleeping
Battery power
Lithium-ion and lithium polymer batteries
Regulators
Saving power
Power saving techniques
Knowing what to optimize and when to stop
XBee power-saving
The XBee sleep modes
Configuring the network
The sleeping window sensor
Battery power
Power usage
Arduino power-saving
The XBee configuration
Hardware
Powering the Arduino
Hardware connections
Putting the Arduino to sleep
Sleep modes
Waking up
Creating the sketch
Power usage
Summary
Index
Building Wireless Sensor Networks Using Arduino
Table of Contents Building Wireless Sensor Networks Using Arduino Credits About the Author About the Reviewers www.PacktPub.com Support files, eBooks, discount offers, and more Why subscribe? Free access for Packt account holders Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading the example code Errata Piracy eBooks, discount offers, and more Questions 1. A World without Wires XBee radio hardware XBee product families Versions and variants Official XBee documentation Your first transmission Using the SparkFun XBee Explorer USB Getting and running XCTU Updating the firmware Failed firmware updates Configuration Talking to the XBee module Receiving data Uploading the sketch Connecting the XBee Receiving data Switching to API mode First module in API mode Sending data Second module in API mode Starting and joining a network
Module addressing Network scanning and remote configuration The Commissioning button and LEDs Making your network secure Distributing the network key Trust center link key Trust center terminology differences Selecting encryption keys Setting up your secure network Disabling network joining Other XBee families Configuration values Summary 2. Collecting Sensor Data Hardware setup Serial on XBee Handshaking signals Voltage levels Serial on a computer Serial on Arduino XBee shields Other shields Software setup Example sketches Variable types PROGMEM and F() strings Pointers Serial port setup The xbee-arduino library Creating the sketch Sending and receiving data Sending data The ZBTxRequest objects Creating the sketch Blocking and polling Running the sketch Callbacks Callback types Callback limitations Receiving data The ZBRxResponse objects Creating the sketch Collecting sensor data Reading a DHT22 sensor
Summary 3. Storing and Visualizing Your Data Storing your data in the cloud Introducing Beebotte Channels and resources Security Access protocols Sending your data to Beebotte Preparing Beebotte Connecting your Arduino to the Internet Writing the sketch Visualizing your data Accessing your data Keeping your data locally Sending data over the serial port Receiving data over the serial port Summary 4. Controlling the World Controlling your heating and/or cooling system Handling packets using binary.h Building and sending a packet Constructing a packet using binary.h Creating the sketch Receiving and parsing a packet Parsing a packet using binary.h Creating the sketch Troubleshooting Communication with the XBee module is not working Modules are not joining the network Modules cannot talk to each other Replacing the thermostat Controlling mains power Hairdryer – an alternative Control systems Adding setpoint control Subscribing to events Reading events Remembering sensor readings Thermostat controller Controlling a relay Controlling off-the-shelf ZigBee devices ZigBee profiles, endpoints, and clusters ZigBee public profiles Selecting a ZigBee device
Talking to a ZigBee on/off device Joining the network Factory reset in case of problems Discovering services The ZBExplicitTxRequest objects Sending a message The ZBExplicitRxResponse objects Receiving messages Receiving on/off command responses More ZigBee features Summary 5. Standalone XBee Operation Creating a window sensor Connecting things XBee power-saving The XBee sleep modes Configuring the network The sleeping window sensor Battery power Power usage Arduino power-saving Powering the module Connecting the window sensor I/O pin naming Configuring the XBee module Remotely sampling the pins Querying the pin state Automatically sending the sample data The configuration values Receiving the samples on the coordinator The ZBRxIoSampleResponse objects Receiving the I/O samples Creating a standalone relay Connecting things Configuring the XBee module Remotely toggling an output pin Summary 6. Battery Power and Sleeping Battery power Lithium-ion and lithium polymer batteries Regulators Saving power Power saving techniques Knowing what to optimize and when to stop
The XBee configuration Hardware Powering the Arduino Hardware connections Putting the Arduino to sleep Sleep modes Waking up Creating the sketch Power usage Summary Index
Building Wireless Sensor Networks Using Arduino
分享到:
收藏