Skip to content

Using WiFly RN XV with DFRobot Xbee Shield

JelleDekker edited this page May 15, 2012 · 1 revision

The RN-XV WiFly module can be used in combination with the DFRobot Xbee shield to add WiFi functionality to your Arduino, using this library. However there are some points to consider and to look out for to get everything to work properly.

Rebooting

The DFRobot Xbee Shield is made to reboot the Arduino every time the WiFly reboots. Because the WiFly needs to reboot for it's settings to be updated, this easily results in an endless reboot-loop. The DFRobot shield connects to the ICSP headers on the Arduino. The reboot loop can be avoided by only connecting the GND and 5V pins of the ICSP, or by connecting the separate connecters for GND and 5V on the DFRobot shield

Communication

The DFRobot shield connects the WiFly and Arduino over port 0 and 1 (RX/TX), this means that in the code you don't need to use a software serial, the WiFly can communicate over the built in Serial in Arduino. (Replace "wifiSerial" in the code with "Serial") The downside of this is that code like "Serial.print()" is also send over the WiFly connection. When you use the WiFly as a http-server, this results in connections timing out and response getting messed up. Calling an explicit "wifly.close()" will take care of the first, making sure you don't use any "Serial.print" takes care of both problems.


Note

There are probably other ways to solve these problems, either on the software side or the hardware side (e.g. making different connections on the shield). I however found that information on this combination wasn't easy to find on the internet, so I decided to share my findings. If anyone has more/different/better solutions: please add/edit this page.

Clone this wiki locally