Getting My WiFly Going

So I just got this WiFly Breakout board, that I'm using for a project for school. I have it plugged in Rx Tx to Tx1 Rx1 on my Arduino Mega, I used the code

/*
  Mega multple serial test

 Receives from the main serial port, sends to the others. 
 Receives from serial port 1, sends to the main serial (Serial 0).

 This example works only on the Arduino Mega

 The circuit: 
 * Any serial device attached to Serial port 1
 * Serial monitor open on Serial port 0:

 created 30 Dec. 2008
 by Tom Igoe

 This example code is in the public domain.

 */


void setup() {
  // initialize both serial ports:
  Serial.begin(9600);
  Serial1.begin(9600);
  Serial1.println("$$");
}

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte); 
  }
  //Serial1.flush();
}

but it only just keeps with the WiFlys version and MAC address. My question is how do I communicate with the WiFly to get it into command mode? I think with this knowledge I should be able to figure out the rest of how to get my program working. Any advice is handy, by the way, the goal of my project is to have my robot drive towards the nearest router. Thanks for any help you can give.

the goal of my project is to have my robot drive towards the nearest router.

How will you know which router, if there is more than one, is closest?

Once I get the WiFly going, Im going to input the SSID and pass and drive towards the router using those, I believe anyways, in theory it makes sense to me but I can't seem to get it going...

Have you attempted to measure SSID in any pattern around the router? I think you are setting off with an unrealistic expectation that SSID will vary in a linear/meaningful fashion.

What is the purpose of having the robot run over the router anyway?

Visual representaion of wifi signals in the city.

jwagg33,

See libraries at http://sourceforge.net/projects/arduinowifly/files/ and via http://arduinology.tumblr.com/

These may help in getting RSSI and SSID scans.

Either way - please post your project results - looks cool.

-- Of course you would'nt do the Google thing and expose unintentionally open nets would you?

Cheers,