User Manual
April 1, 2009
1 of 13
VirtualWire
Copyright (C) 2008-2009
Mike McCauley
Documentation for the VirtualWire 1.3
communications library for Arduino.
1.0 Introduction
Arduino is a low cost microcontroller with Open Source hardware, see http://www.ardu-
ino.cc. VirtualWire is a communications library for Arduino that allows multiple Ardu-
ino’s to communicate using low-cost RF transmitters and receivers.
The document describes the VirtualWire library and how to install and use it.
2.0 Overview
VirtualWire is an Arduino library that provides features to send short messages, without
addressing, retransmit or acknowledgment, a bit like UDP over wireless, using ASK
(amplitude shift keying). Supports a number of inexpensive radio transmitters and
receivers. All that is required is transmit data, receive data and (for transmitters, option-
ally) a PTT transmitter enable.
It is intended to be compatible with the RF Monolithics (www.rfm.com) Virtual Wire
protocol, but this has not been tested.
Does not use the Arduino UART. Messages are sent with a training preamble, message
length and checksum. Messages are sent with 4-to-6 bit encoding for good DC balance,
and a CRC checksum for message integrity.
Why not just use the Arduino UART connected directly to the transmitter/receiver? As
discussed in the RFM documentation, ASK receivers require a burst of training pulses
to synchronize the transmitter and receiver, and also requires good balance between 0s
and 1s in the message stream in order to maintain the DC balance of the message.