Problem using XBee and interruptions

I have an Arduino Uno and I'd like to use the 2 pins for interruption handling (pins 2 and 3).
However, I'm using an XBee on the Arduino already, and it uses pin 0 through 9 (including pins 2 and 3);
What I want to know is, is it possible to use other 2 pins for XBee instead of the 2 interruption pins?, or XBee itself uses these two pins for interruptions?

No, the XBee does not use the interrupt nature of the pins. Routing the traces from the switch to the pins 0 and 1 or another pair of pins is easiest when that other pair of pins is close. Hence, the use of pins 2 and 3.

However, I'm using an XBee on the Arduino already, and it uses pin 0 through 9 (including pins 2 and 3);

Not by default, it doesn't. You may be using those pins, but the XBee only uses two pins for serial communication.

How are you connecting the XBee to the Arduino? What shield are you using?

I forgot to mention I'm using the shield WLS114A0P and an XBee Series 2.


(Not this Arduino, but the same connection)

So, as the XBee doesn't need the interruption pins, can I use any other two digital pins for it? And if so, will I have to change anything in the code or other places?

Thanks for your reply!!

So, as the XBee doesn't need the interruption pins, can I use any other two digital pins for it? And if so, will I have to change anything in the code or other places?

Not by attaching that "shield" to the Arduino. You could attach it to a breadboard, and run jumper wires.

You'll need to change the pin numbers that you use for SoftwareSerial.

OK, I understood.

But, one more question, sorry :stuck_out_tongue:
I've never used SoftwareSerial but I searched the Internet and saw that by using it you can only configure RX, TX. And what about the 6 other pins of the shield? Don't need to be configured or they're always configured as the nearest pins from RX, TX?

Thank you!

And what about the 6 other pins of the shield?

What about them? Are they connected to anything? I thought they were there only for stability and idiot-proofing.

Tested and everything is all right. Problem solved, thanks!