Monday, April 18, 2011

Playing with XBees

When our XBees arrived, we immediately began by trying to understand how they work and implemented some sample code found online in the mBed forums in which one XBee is connected to the mBed which reads input from the PC and another XBee is connected to the USB Breakout board which prints out the letters it receives wirelessly.


Since the XBees don't have pins that can fit onto the breadboard, and since we weren't aware of that fact, we had to improvise and mount the XBee onto individual pin sockets in order to allow us to connect to the pins needed and for it to stay stable on the board. A picture of this can be seen below.






At first, we couldn't see any of the the letters being printed on the terminal. We tried using a Mac terminal and the Hyperterminal on the Detkin Lab computers but to no avail. We then found out that the XBee has a baud rate of 9600 and that the mBed doesn't necessarily have that specification. After a bit of research, we quickly found out that the mBed configuration could be easily changed using the *.baud() command. After doing this and setting the terminal configurations with the same baud rate, we finally saw the letters being printed.

For some reason, we cannot seem to print the letters from the XBee to the Mac, but it seems to work fine on all other OS's.

No comments:

Post a Comment