Using a Wifly module to connect to a home network AND Ad hoc at the same time.

I am interested in this Wifly module from Sparkfun:

http://www.sparkfun.com/products/10822

I would like it to connect my Mega to a wifi network to communicate data to a website while at the same time communicating to it's twin on another Arduino board.

From what I have read, these can be configured for a "ad hoc" mode to communicate between multiple modules. Can it connect to a home wifi network and another module at the same time? The issue is that the two Arduinos must communicate wirelessly regardless of the wifi network signal.

Thanks in advance

In wifi terms, an device in "ad-hoc" mode can connect to another device in "ad-hoc" mode. It cannot connect to your home wifi router unless you can configure your router to also be in "ad-hoc" mode.

So you can configure two WiFly modules in ad-hoc mode so that they can connect to each other. You could also configure them both in infrastructure mode instead and they can both then connect to your wifi router (but not to each other), and send packets to each other and to any website that is reachable via your router.

Here's the relevant detail from the WiFly user manual:

There are two types of networks. The most common network is infrastructure in which an access point (AP) is the common point linking all Wi-Fi devices. The access point keeps track of who’s on the local network and directs IP packets. In many cases the AP is also a router and will forward packets from the local network to other networks and the internet. It is also very common for the AP to be running a DHCP server which tracks and assigns IP addresses.

Adhoc is considered a point-to-point network in that each Wi-Fi device is linked directly to every other Wi-Fi device on the Adhoc network. There is no access point. All Wi-Fi devices on the adhoc network participate in keeping the network alive and each keeps track of the other active devices on the network by sending and receiving beacon and probe packets. In most cases IP addresses are assigned through Auto IP, although one of the Wi-Fi devices can be configured as a DHCP server.