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.
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?
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.