For Newbies: Making RN-XV Work with Uno

Well, I am new to this stuff… It took me days to just get a serial connection going. For you other newbies, if you are looking to just start off with a simple serial connection to your Uno, use this code.

The intended connection points on a Uno board is using Analog 4 & 5 (A4 & A5), otherwise known as Digital 18 & 19 (D18 & D19). Feel free to change these up, but try not to use D0 & D1 as those pins also share how the Uno is programed via USB.

/**
 * Here is your code needed to make the RN-XV work with an Uno. 
 * Take this code and use it to make your own sketches. 
 * I am using Arduino IDE 1.0.5
 */
#include <SoftwareSerial.h>

SoftwareSerial mySerial(18, 19); // RX, TX

void setup()  
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  Serial.println("Serial Connection is go!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}

er, What’s an RN-XV?

The RN-XV is the XBee-shaped board containing the Roving Networks WiFly module (RN-171). The naming between the board and the module is somewhat confusing. See SparkFun WRL-10822.

-Chip

Thanks for posting this! I’m connected! I’ve been looking for quite some time for a way to get started with serial communication between my Uno and WiFly board. If you can offer any more assistance, it would be greatly appreciated. I want to write a Windows application to talk to another serial device connected to the Uno. -Greg

Did you have any luck??