Thursday, November 30, 2023

XBee Interfacing With Raspberry Pi Model 2

Arnav Bansal. He is pursuing B.E. in electronics and communication from UIET PUSSGRC, Hoshiarpur

- Advertisement -

Construction and testing

Now it is time to test our project. After saving the code and connecting coordinator mode XBee module to your Raspberry Pi, boot the Raspberry Pi and from the terminal write the following commands to execute your program. The destination folder is XBeeTest and file name is serial_XBee.py

fig 11Fig. 11: Prototype of data sending unit
Fig. 11: Prototype of data sending unit

[stextbox id=”grey”]

pi@raspberrrypi ~ $ cd /XBeeTest[/stextbox]

- Advertisement -

// Change Directory to XBeeTest

 [stextbox id=”grey”]

pi@raspberrrypi /XBeeTest

$ sudo python serial_XBee.py

[/stextbox]

// Run serial_XBee.py Program

This program should send character ‘A,’ pause for a second and then send character ‘B.’ Note that, as soon as you power up both the XBee modules, ASSI (Association Indication) LED should light up. In this case, it is a yellow LED as seen in the prototype (Fig. 11).

Now to confirm reception of data, hook up your end device XBee module to your computer, open the console mode in XCTU, start serial communication with XBee module. You should get the output on your screen as shown in Fig. 10.

Download source code

This article was originally published on September 19, 2016 and has been recently updated.


Feel interested? Check out other raspberry pi projects.

7 COMMENTS

  1. Hi,
    Thanks for sharing your knowledge. While I update the radio module firmware, I only have “ZIGBEE TH Reg”, “805.15.4 TH” and “DIGIMESH 2.4 TH” function set. Is it compulsory to have “XBEE COORDINATOR AT”. Could you please tell me how can I go forward with the available function sets.

SHARE YOUR THOUGHTS & COMMENTS

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators