Tags: Controlling Rain
This Solenoid controller has been filled with a ton of small successes. Today I’m chalking up one more success to the list. I’ve got the XBee portion of the controller working. I had been working on this for a long time now, and the more I work on it the more I see the potential in this platform.
The issues I had getting the XBee to work appear to be common based on the message board threads I have seen:
- Upgrade your firmware. The listing on the website is not necessarily in order. I had assumed that since I had 126.96.36.199 I was one version off the most current. After reading the tech docs there were not that many features I appeared to be missing. The 1.0.A.n firmware appears to be a far more advanced stream, use it whenever possible. X-CTU appears to order this list in a more straightforward manner.
- If you don’t have a USB-TTL adapter you can run an Arduino headless (remove the ATMega168 chip) to communicate directly to the XBee. Remove the chip with an IC extractor so you don’t bend the pins. Even better, you can leave the IC in place and communicate directly with the XBee via the Software Serial library. I ended up doing all three methods.
- M. Yarza has an excellent sheild for the Diecimila. I’ve since switched over to the Arduino Nano, but I’m still using this one as a remote connection.
- Build out Tom Igoe’s XBee Terminal to communicate with the XBee. It correctly sends the “+++” Command mode initialization without a carriage return (“\r”). It also displays results on a new line making for reading the settings much easier. I had started by using the OS X Shell but this was much easier. In fact, buy the book Making Things Talk. It explains all this stuff in plain english.
- The RSSI Graphing was useful. You can see how this could be used to trangulate position of three+ Xbee’s.
- Check out the XBee API Library for Processing written by Dan Shiffman and Rob Faludi. This makes the connections to the XBee API mode simple.
- The XBee Analog Duplex script was somewhat confusing, but explains the methods used to communicate from peer to peer. Note, in all of the tutorials, I’d love to see more documentation stating which is the base XBee and which are the remotes. It gets confusing when you can’t figure out which is which.
- Mark the radios themselves with indicators. I’ve added permanent marker dots to designate which XBee I’m looking at. Write down the corresponding configuration settings somewhere you can see them. It will save you polling the chip every time you need it.