First you need an Arduino Mega 2560 board (http://arduino.cc/en/Main/arduinoBoardMega2560) and a Weburban WiFi board (http://store.weburban.com/wifi.html). This board uses standard connectors over SPI to an Arduino compatible Microchip 802.11b/g/n MRF24WB0MA.
In this example I use ArduinoIDE version 0021.
Weburban WiFi board
The WiFi board uses the WiShield library, available at https://github.com/asynclabs/WiShield
How to connect Arduino to WiFi board:
Just follow this schema:
Then you need to modify the apps-conf.h file to include the header file for the application(s) you use in your project. For example, if you want to use "wiserver" in your sketch, you must modify the file like this:
Finally, to make the WiShield work on Arduino Mega 2560 make the following changes to spi.h file (see at http://asynclabs.com/forums/viewtopic.php?f=13&t=19&hilit=mega&start=10):
Here is the complete modified spi.h file: https://github.com/rickit69/techrm/blob/master/WiShield_mod/spi.h
Here you can find some examples from Asynclabs: http://asynclabs.com/wiki/index.php?title=WiServer
ATTENTION: Arduino IDE new versions need some modifications in the WiShield library.
For Arduino IDE version 1.0.3 I'm using this one: https://github.com/rickit69/techrm/tree/master/WiShield_Arduino_IDE_1.0.3