Hello,
We got one of your XBee-PRO® 900HP Development Kits and the XBees work great when connected to PCs and using XCTU. I then tried to connect them to a couple Raspberry Pis to see if I can connect with them.
The information I’m getting from the net is that You should be able to read and write to the serial and access them this way. I hooked the hardware up this way:
https://sonyarouje.files.wordpress.com/2014/12/connection_diagram_bb.jpg
The Python code for the receiver is below:
#!/usr/bin/python
import serial
serialport = serial.Serial(“/dev/ttyAMA0”, 9600)
while 1:
x = serialport.readline()
print “%s” % (x)
The Python code for the transmitter is below:
#!/usr/bin/python
import serial
serialport = serial.Serial(“/dev/ttyAMA0”, 9600)
while 1:
serialport.write(‘L’)
I’m new to Python, so I might have done something dumb here. If anybody has any suggestions on code or hardware I would appreciate it. A working example would be great too.
Thanks