XBee shield + Weather shield

Hi,

I have an Arduino Uno with both a SparkFun weather shield and XBee shield. I mentioned pins 2 and 3 on the weather shield are already reserved, meaning I can’t use these 2 pins with the XBee shield (when using softwareserial).

However, what seems to work is using hardware serial with the XBee shield: when uploading my sketch I put the switch (on the XBee shield) to DLINE, after upload I put the switch to UART.

I suppose I can use this solution (hardware serial) instead of rerouting the (default) softwareserial pins (2-3) to unused pins of my Arduino?

Thanks.

Guy

Hi Guy,

That solution should work okay but I would be very careful using the HW UART with an XBee. Using an XBee (or other UART devices with on-device firmware) with the HW UART on an Arduino can easily corrupt the firmware if the XBee is on the board when uploading code. Sometimes even just powering on/off can send rogue bits of data on the UART lines that could corrupt the firmware. Luckily, XBees are pretty robust and you can usually restore the stock firmware using the XCTU software but you could also potentially brick your XBees if they are left on the XBee Shield with the switch in the “UART” position while uploading code.

What I would recommend for this setup is to sever the traces connecting the “inner” and “outer” rails on the XBee Shield for D2 and D3 with a razor/Exacto knife and then solder wire to connect the “inner” pins to available digital I/O pins like D9 and D10. That will let you continue to use the SW UART port and it is an easy adjustment in your code. You could also run the SW Serial lines to the stat LED pins on the Weather Shield if you wanted to use those as serial data indicators.

I hope this helps outline some of the potential issues you could run into using the HW UART with an XBee and gives you a clear option to work around this issue if you choose to do so. Let us know if you have any other questions about these or another of our products and we would be happy to help.

Hi Mark,

Many thanks for the solution.

As you recommended I’ll re-route on the XBee shield (to D9 and D10) and use SoftwareSerial instead.

Guy

Hi,

One more question, since this isn’t yet clear to me: do I need to cut the 2 soldered original-as-is “parts” (see the arrows on the picture) in 2 pieces to reroute?

Thanks.

Guy

https://filebin.net/6gjxrcep4ue4g3yw/xb … t=jbjm5rq9

Hi again Guy,

That is one option here. I would not recommend cutting the solder jumpers and instead would just “open” them by removing the solder on the pads. From there, you could solder wire from the pads tied to the DLINE/UART Switch. Another option would be to identify the trace going in between the “inner” and “outer” rows of pins and sever the trace going to D2 and D3. After that, you can solder wire from D2 and D3 to D10 and D11 on the “inner” row.

Both of these options will work but if you want to be able to restore the XBee shield to use D2 and D3 for Software Serial, I would recommend clearing the jumpers and soldering wire from there to D10/D11. If you have not worked with solder jumpers before, we have a handy tutorial [here that will go over working with solder jumpers and PCB traces.](How to Work with Jumper Pads and PCB Traces - SparkFun Learn)