SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By robert.beatty
#161781
I’m hoping to use the Sparkfun XBee Shield on an Arduino Mega 2660 R3, but my D0,D1, D2 and D3 pins are being used for something else. I need the Xbee shield to use D16 and D17 instead of the default of D2 and D3. The shield’s product page says “any digital pin on the Arduino (D2 and D3 default)” can be used. How does one accomplish that?

In particular, how do I set it up to use D16 and D17 on the Arduino Mega? Perhaps that’s not possible, since those pins are completely off the shield. Or perhaps I could run a jumper over to those pins. But I need to make sure D2 and D3 are not interfered with. I see the “3” and “2” solder pads by TX and RX on the Xbee shield, but I’m not sure how to utilize those or if those are related to my goal.

Your help is appreciated.
By robert.beatty
#161804
waltr, Thanks for the reply, but when I reference D0, D1, D2, D3, D16, and D17, I'm referencing pins on the Arduino Mega not the xbee. The question is asking about the best way to jump the flow of xbee data over to the Arduino Mega's D16 and D17 pin. That seems like it will require physical jumper wires to be soldered into place and an understanding of how the xbee pins on the shield are traced to the Arduino pins. Does that make sense?
By waltr
#161808
Ahh...ok I understand.
If these are not connected between the Arduino and XBee pins then, yes, you need to connect them.
I don't have any direct experience with the Arduino or its shields. But maybe now some else will help.
If you post a link to the XBee shield then we can easily take a look at the shield document.
By robert.beatty
#161839
This question has now been answered by Toni_K in the comment section of the Xbee shield's product page: https://www.sparkfun.com/products/10854

I post Toni's response here for easy reference:

The DLINE/UART switch changes the connection between D2/D3 and D1/D0. Check out the schematic to see more of how that works. You could definitely cut the header pins and run jumpers to different pins (like D16/D17 on the Mega), but keep in mind if you are going to be stacking shields this could interfere with any shield stacked on top of the Xbee shield, so maybe put that one top most.