Friday, January 21, 2011

Speaking Wirelessly

Ok, so I finally took the time to lay the groundwork for the wireless communication between devices. I will be using XBee wireless modules (Series 2) using the ZigBee protocol, in API mode 2. It is more than just "serial port" communications (which is what I have been using up to now). You need to deal with things like maintaining 64bit device addresses for each node(radio). But that's it. The nice thing about XBee/ZigBee is that one needs only the device address of the node you are targeting. Supply this address and the payload (data) and the radios, working together, ensures the message will get to the right node (while other radios, though they may help in delivery of the data, will ignore it). Pretty cool.

Again, the picture looks like a mess of wires, but that XBee module in the center, connected to the PC, is talking wirelessly with the Arduino (LCD display on the left). The bulk of the effort went into writing the C++ software code to handle the interfacing with the XBee radios. Both for the microcontroller (Arduino) and host device software (.NET application on Windows 7 PC in this case). The same C++ classes are used in both environments. This helps in that only one set of interface code need be maintained.

Posted by Picasa
On a side note, I also got the basic tank level sending unit talking to the Arduino. Just raw data. I need to figure how I am going to define/apply non-linear scales for linear and non-linear shaped tanks.

I need to get back to refining the payload data structures for communications. Then I will be ready to control devices wirelessly.


No comments:

Post a Comment