GainSpan WiFi module is a low power easy to use wifi module integrated with WiFi stack.
/*
LinkSprite. com
This is a sample arduino code juniper, the gainspain wifi shield for aruino
When using this code, please install J2 and J3, and remove J4 and J5.
*/
#include <NewSoftSerial.h>
NewSoftSerial mySerial(2, 3);
int inByte;
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
delay(1000);
mySerial.println("AT");
delay(100);
mySerial.println("AT+WD");
delay(100);
mySerial.println("AT+WS"); // search for wifi ap
delay(1000);
mySerial.println("AT+NDHCP=1");
delay(100);
mySerial.println("AT+WA=only_test");
delay(100);
mySerial.println("AT+NSTCP=5000"); //initialize gainspan as server, and set server port, the server IP will be displayed on the serial port
}
void loop() // run over and over
{
if (mySerial.available())
{
inByte = Serial.read();
Serial.print(inByte, BYTE); //Display the Wifi data on the serial port
}
}
The juniper gainspan wifi shield can be ordered from cutedigi at http://www.cutedigi.com/wireless/wifi/juniper-wifi-shield-for-arduino-based-on-gainspan-module.html