Hello friends , I hope you all are fine and having fun with your lives. Today, I am going to share a new project which is XBee Arduino Interfacing. In my previous tutorials in the XBee series, we have had first Introduction to XBee Module and after that we have also discussed How to Interface XBee Module with Computer. Now we are all well aware of XBee Module and can easily do the XBee Arduino Interfacing. We have seen in the previous tutorial that XBee Module works on Serial protocol so we have to use the Serial Pins of Arduino UNO board.
If you want to use any other microcontroller then you can its not a big issue, just see the way how the programming goes and convert it to the language of your microcontroller i.e. PIC Microcontrollers or 8051 Microcontrollers. If you guys have any question, you may contact me or can ask in the comments. so, let’s get started with XBee Arduino Interfacing:
XBee Arduino Interfacing
- First of all you need to do is XBee Arduino Interfacing.
- So, in order to do that you have to connect the Pin # 2 and Pin # 3 of Xbee with the Tx and Rx of Arduino and Pin # 1 to 3.3V of Arduino and Pin # 10 to ground of Arduino as shown in the below figure:
- Don’t solder the XBee pins directly into the Arduino as it may damage the XBee.
- You can buy the XBee Shield for Arduino.
- Now first of all run the X-Ctu software and configure your XBees as we did in the last tutorial i.e. Interfacing of XBee module with Computer.
- After that attach your XBees with the two Arduino Boards and use the below code:
int b1 = 2;
int b2 = A3;int mode1 = A4;
int mode2 = A5;void setup()
if (Serial.available() > 0)
- Now add this code in one of your Arduino Board and a simple serial receiving code on the second arduino.
- Now whenever you press the button you will get A on the second arduino board.
- You can change it with anything you like and on the second side you can do anything by adding a condition.
That’s all for today. I hope you have enjoyed this tutorial XBee Arduino Interfacing. I will share more projects on XBee Arduino Interfacing soon. If you are getting any problem you can ask in comments. Thanks. ALLAH HAFIZ :))