Chapter 14. Wireless Communication

14.0. Introduction

Arduino’s ability to interact with the world is wonderful, but sometimes you might want to communicate with your Arduino from a distance, without wires, and without the overhead of a full TCP/IP network connection. This chapter covers various simple wireless modules for applications where low cost is the primary requirement but most of the recipes focus on the versatile XBee wireless modules.

XBee provides flexible wireless capability to the Arduino, but that very flexibility can be confusing. This chapter provides examples ranging from simple “wireless serial port replacements” through to mesh networks connecting multiple boards to multiple sensors.

A number of different XBee modules are available. The most popular are the XBee 802.15.4 (also known as XBee Series 1) and XBee ZB Series 2. Series 1 is easier to use than Series 2, but it does not support mesh networks. See http://www.digi.com/support/kbase/kbaseresultdetl.jsp?id=2213.

14.1. Sending Messages Using Low-Cost Wireless Modules

Problem

You want to transmit data between two Arduino boards using simple, low-cost wireless modules.

Solution

This recipe uses simple transmit and receive modules such as the SparkFun 315 MHz: WRL-10535 and WRL-10533, or the 434 MHz: WRL-10534 and WRL-10532.

Wire the transmitter as shown in Figure 14-1 and the receiver as in Figure 14-2. Some modules have the power line labeled VDD instead of Vcc.

Figure 14-1. Simple wireless transmitter using VirtualWire ...

Get Arduino Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.