WiFly Shield Compatibility w/ Arduino Mega

I’ve been using my WiFly Shield with an Arduino Duemilanove for a few weeks now, but I’ve begun to realize I need a little more code space. Does anyone know if this shield is compatibile with the Arduino Mega (http://www.sparkfun.com/commerce/produc … ts_id=9152)?

I haven’t seen anything to make me think it’s not compatible, but I wanted to check before making my purchase.

it both works and doesnt :lol:

I received my Mega and WiFly shield today and it didnt work, but after reading a bit i discoverd that i needed to reroute the following pins

WiFly shield ------> Mega

D10 --------------> 53

D11 --------------> 51

D12 ---------------> 50

D13 ---------------> 52

Just remember that you still need D7 on the Mega

oh and if you use the Sparkfun WiFly library you need to edit spi.h from

#define CS         10
#define MOSI       11
#define MISO       12
#define SCK        13

to

#if defined(__AVR_ATmega1280__)
#define CS		   53 
#define MOSI	   51
#define MISO	   50 
#define SCK        52
#else
#define CS         10
#define MOSI       11
#define MISO       12
#define SCK        13
#endif

not bad for a Arduino Virgin , eh ? :wink:

I tried that on my Arduino Mega + WiFly shield. But i still get the Bridge locking up message. Do I need to change the pins/ reconnect them differently or something?

McCoder:
oh and if you use the Sparkfun WiFly library you need to edit spi.h

Just a quick note to say that as of Alpha 2 of the WiFly library you don’t need to make this edit. (This fact isn’t documented in the Alpha 2 release as I only just realised we got the functionality “for free” with a recent change.)

You will still need to jumper the connections as described.

–Philip;

Do you just jumper the pins over or do you have to disconnect them from the original pins?

MobileWill:
Do you just jumper the pins over or do you have to disconnect them from the original pins?

You just jumper the pins over. You need to make sure you don’t use the original pins though.

–Philip;

follower:

MobileWill:
Do you just jumper the pins over or do you have to disconnect them from the original pins?

You just jumper the pins over. You need to make sure you don’t use the original pins though.

–Philip;

So if I need to use the original pins I need to disconnect them right? I would have the voice shield and it needs 13 for ready status. But the ready pin might not be required.

MobileWill:
So if I need to use the original pins I need to disconnect them right? I would have the voice shield and it needs 13 for ready status. But the ready pin might not be required.

As far as I can tell you won’t be able to use the VoiceBox shield with the WiFly and Arduino Mega without modification due to the use of pin 13.

You could try bending pin 13 on the VoiceBox outside the header and make sure it’s the top shield then use a female to male jumper to connect it to another pin and modify code to use the new pin.

–Philip;

Somewhat related question, I have a motor shield that uses Digital pins 3-12 on my Mega 2560, I also have a break out kit version of the WiFly shield. I was planning on running a UART connection between the shield and the Mega, instead of an SPI connection. The data being transmitted are single ASCII characters that dictate which motors run, and some other really basic commands. I just finished rewriting the motor controller drivers for the Mega and now I’m trying to get the wireless setup. My question is, with having pins 3-12 in use, what kind of trouble am I looking at in getting a UART connection to the WiFly setup?

EricAnderson:
My question is, with having pins 3-12 in use, what kind of trouble am I looking at in getting a UART connection to the WiFly setup?

If you’re using the UART connection on the WiFly breakout board you should be able to use hardware serial on pins 0 & 1 or software serial on 2 & 13 perhaps?

–Philip;

Hello, everyone.

I’m trying to make my Mega 2560 work with the WiFly shield and it obviously doesn’t work :smiley:

Symptoms: both SpiSerial.begin() (in SpiUartTerminal) and WiFly.begin() (in Wifly_WebServer) HANG :expressionless:

What I’m using:

  • Arduino 022-maverick1

  • the latest library from github: https://github.com/sparkfun/WiFly-Shield (I didn’t have to alter the header files to accomodate the pin values because in release 22 this problem seems to be fixed)

  • WiFly shield revision 3 (has the correct marking on the shield)

  • Arduino with pins connected to the WiFly shield just like this thread says

The leds on the shield are blinking but nothing is happening. Thank you so much for your help!

I have the same problem (with my Mega 1280).

I am pretty new to this, but if I try to print my SS and MOSI ports, they seem to point to pins 2 to 5. (Serial.println(SS):wink:

If I change them in the pins_arduino, they seem to be changed to ( - 48)

But I haven’t been able to figure out why this values are changed.

I too have the Arduino022

WiFly 3

And pins Arduino → WiFly:

50 → 12

51 → 11

52 → 13

53 → 10

Vin → Vin

GND → GND

Ok, I feel stupid. :oops:

It is working for me now, and the only possible explanation I can find is that I have put my connectors in the wrong sockets. (52,53,blank,blank instead of 50,51,52,53. The arduino mega has some non-connected socket at the end)