Hardware Reference
In-Depth Information
Enabling a simple RF interface in the
Arduino IDE
Let's start with Arduino that will receive the RF signal. You'll need to plug it into the host
computer via a USB cable in order to upload a program. In order to debug both of these
devices, you will also need two computers, one to run an Arduino IDE for both the transmit
and receive device. You can also do this with a single computer and two USB ports (for
more information on how to do this, visit http://forum.arduino.cc/index.php?topic=407.0 ).
However, once you've created the program, you can disconnect the remote Arduino from
the computer and power it from a battery. In this example, you'll use the example programs
from the library to send data from the client (Arduino connected to the PC) to the server
(the standalone Arduino) and then have it echo back.
As you did earlier, you'll first need to install the library. There are a couple of possible lib-
raries, but the one that is the most full featured is the RF24 library, which is available at ht-
tps://github.com/maniacbug/RF24/ . To get the full library, select the Download ZIP button
on the right side of the screen. Unzip the archive into a directory and then copy the direct-
ory to the libraries directory of your Arduino installation. You'll also need to rename
this directory; I renamed mine RF24 . To do this demo, you'll need two host computers, one
for each RF device.
On both computers, open the Arduino IDE and bring up the server code by navigating to
File | Examples | RF24 | GettingStarted , as shown in the following screenshot:
Search WWH ::




Custom Search