harlequin-tech / WiFlyHQ

WiFly RN-XV Arduino Library
Other
110 stars 68 forks source link

Mega 2560 compatibility? #3

Closed iball closed 12 years ago

iball commented 12 years ago

Trying to use this with an Xbee shield and RN-XV. RN-XV is updated to the latest firmware form Digi. Works just fine on an UNO w/ the Xbee shield but the exact same code fails when the shield is put on a Mega 2560.

This is using the basic httpclient example sketch just modified to reflect pins 2,3 for Wifly serial comms as well as my SSID and passphrase for my wifi router.

iball commented 12 years ago

Error is as follows:

Starting Free memory: 6817 Hello World setPrompt failed Failed to enter command mode Failed to start wifly

iball commented 12 years ago

RESOLVED: Have to ditch SoftwareSerial and instead use one of the Mega's Serials, i.e. Serial1, Serial2, etc. So instead of using eh SoftwareSerial.h library, one changes all the "wiflyserial" instances to "Serial1" or whatever serial port you've mapped the Xbee breakout board to.

Unfortunately, this means the Sparkfun Xbee shield in modified form that works with the RN-XV on standard Mega328p controllers won't work on the Mega 2560 due to it using pins 2,3 for serial comms and SoftwareSerial.h doesn't seem to work with the Mega 2560.