New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get it works with Arduino Mega 2560 #7

Closed
ghost opened this Issue Jul 5, 2012 · 1 comment

Comments

Projects
None yet
1 participant
@ghost

ghost commented Jul 5, 2012

Hello,

I found your library which is the one that could works with my setup (Arduino Mega 2560 + Arduino Wireless Shield (official) + RN-XV module)

I read a lot of topics on various forums that said that I needed to wire correctly the board to get it works (pins 10, 11, 12, 13 of the shield with 50, 51, 52, 53) however I can't get the WiFly to connect to my network... always the same error message in the Arduino IDE's serial monitor :

Starting
Free memory: 6943
setPrompt failed
Failed to enter command mode
Failed to start wifly
Terminal ready

I tried to unplug the pins D0, D1 of the shield and route them to Serial1 of the board (pins 18, 19) which was unsuccessfull... I'm a little bit disappointed that I can't get it works.

It would be great if you could help me !

Thanks for taking the time to read me and please forgive my english,
Thomas

@harlequin-tech

This comment has been minimized.

Owner

harlequin-tech commented Jul 7, 2012

The Arduino Wireless Shield is pretty restricted in terms in how in connects the module's serial to the Arduino. It only connects it to the main hardware serial port (pins 0 and 1), so you would have to use that with the WiFlyHQ library. It also means you can't use the Serial Monitor for debugging since it is being used to communicate with the WiFly modules.

E.g. In your sketch do the following:

    Serial.begin(9600);
    wifly.begin(&Serial, NULL);

If you'd like to use another serial interface on the Mega for the WiFly and use the main one for debug output, you could cut off pins 0 and 1 on the Arduino Wireless Shield and use jumper wires to connect pin 0 on the shield to pin 19 on the Mega and pin 1 on the shield to pin 18 on the Mega and use the following code to setup the WiFly connection:

Serial1.begin(9600);
wifly.begin(&Serial1, NULL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment