Chapter 14. Wireless Communication

14.0. Introduction

Arduino’s ability to interact with the world is fantastic, 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 begins with a recipe for 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

14.1. Sending Messages Using Low-Cost Wireless Modules


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


This recipe uses simple transmit and receive modules often found in low cost wireless toys..

Wire the transmitter as shown in Figure 14-1 and the receiver as in Figure 14-2.

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

Get Arduino Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.