WiFly/Arduino without SPI-UART?

I purchased a wifly module with SMA connector from SparkFun and have an XBee explorer dongle that I can use to program it. I was working through some tutorials, and realized that I seem to be lacking the SPI to UART bridge feature that comes with the WiFly shield that SparkFun make. What I am trying to do is, using the most simple way possible, I want to use a web browser to wirelessly turn off or on an LED connected to my arduino and wifly module. Do I need to buy a breakout board like this? http://www.sparkfun.com/products/9745 or can I accomplish something that simple by just using my arduino and wifly module (http://www.sparkfun.com/products/11047)

I used an XBee shield from SeeedStudio with my RX-VN wifly module. No need for the Xbee explorer - you can program the wifly via your arduino with the XBee shield (switch the XBee to USB mode, connect the Arduino USB to your PC and fire up the IDE's serial monitor. Send a "$$$" and off you go).

Once its setup, your Arduino communicates with the Wifly module either via the hardware uart or via software serial on pins 11 and 12.

Any chance you could expand on the ability to talk to the wifly through pins 11 & 12? If you have any suggestions for examples I could look at, that'd be great.

Software serial lets you use any two digital pins on the Arduino as another serial interface. This is really handy for development because you can use the hardware serial to send debug messages to the serial monitor on the PC.

Here’s an example sketch that takes anything received from the wifly (e.g. payload from UDP packets) and sends it out the serial port to the PC. So you can see the received data on the serial monitor.

#include <NewSoftSerial.h>

/* Use software driven serial for wifly communication on pins 11 and 12 */
NewSoftSerial wfSerial(11, 12);

void setup()
{
    Serial.begin(9600);
    Serial.println("Starting");

    wfSerial.begin(9600);
}

void loop()
{

    /* send everything received from the wifly to the serial console */
    if (wfSerial.available() > 0) {
        char ch = wfSerial.read();
	Serial.print(ch);
    }
}

For more details see http://arduiniana.org/libraries/newsoftserial and http://arduino.cc/hu/Reference/SoftwareSerial. If you’re using the Arduino 1.0 IDE then you can use SoftwareSerial, otherwise if your IDE is earlier than 1.0 use NewSoftSerial.

Awesome, thanks for the info. I am using http://www.sparkfun.com/tutorials/158 as a reference for just setting up some wifi communication using my wifly, and it utilizes the SPI - UART hardware bridge built into their XBEE shield. So what im kind of running into is this...

  SPI_Uart_WriteByte(LCR,0x80); // 0x80 to program baudrate
  
  SPI_Uart_WriteByte(DLL,SPI_Uart_config.DivL); //0x50 = 9600 with Xtal = 12.288MHz
  SPI_Uart_WriteByte(DLM,SPI_Uart_config.DivM); 

  SPI_Uart_WriteByte(LCR, 0xBF); // access EFR register
  SPI_Uart_WriteByte(EFR, SPI_Uart_config.Flow); // enable enhanced registers
  SPI_Uart_WriteByte(LCR, SPI_Uart_config.DataFormat); // 8 data bit, 1 stop bit, no parity
  SPI_Uart_WriteByte(FCR, 0x06); // reset TXFIFO, reset RXFIFO, non FIFO mode
  SPI_Uart_WriteByte(FCR, 0x01); // enable FIFO mode

  // Perform read/write test to check if UART is working
  SPI_Uart_WriteByte(SPR,'H');
  data = SPI_Uart_ReadByte(SPR);

  if(data == 'H'){ 
    return 1; 
  }
  else{ 
    return 0; 
  }

Can I continue using the SPI to UART library functionality that that code is using, using software serial? I would assume not, since the conversion requires hardware capability in sparkfun's XBee shield.

My goal is to be able to use a button on a web page to toggle an LED on or off wirelessly. In the speakjet example, the arduino actually hosts the HTML and when a connection happens, the arduino responds by sending the HTML. What would the best way to go about doing this without the SPI to UART hardware be? I dont need you to write my project for me, just looking for suggestions! Thanks in advance

So, turns out I was barking up the wrong tree. The WiFlySerial library works great, once you make the 15 changes needed to get it running on Arduino 1.0

Thanks for the help though!

WiFlySerial now updated to Arduino 1.0 - please see https://sourceforge.net/projects/arduinowifly/files/

Cheers,

Wow thanks for the information, i'll have a look!