Friday, January 25, 2013

Xbee

=== This log post is in raw form. This is not the final presentation, but making information available is more important than making it pretty. ===

Today in the mail I got a couple Xbee wifi modules. They fit on the Wireless SD shield, among others. When I was buying them, I thought Xbees would just connect to wifi hotspots, or at least enable an Arduino to do so. This isn't exactly the case. As I described in the Wireless temp sensor post, they use the same frequency range as wifi, they actually use slightly different frequencies and channels. This does mean that the modules communicate with each other right away out of the box -- that is, they just work. And they can be programmed to be more selective about which Xbee antennas they connect with, based on an addressing system. Check out the Wireless Shield page fore more info.

Physical pixel is a Communications Example, and while I didn't get the pixel image going, I was able to have the LED activate when pressing H and deactivate when pressing L in the X-CTU terminal. 

Wifi

One of my big goals in working with these devices is being able to control wifi capabilities. I don't just want to have devices scan for networks and host webpages on them, I want them to be able to pinpoint wifi devices and travel to the device -- which would sometimes be a device held by a human, and sometimes be a charging station, device needing service, or some other target. I don't know how much of that can be done by an Arduino -- the ATMega processor isn't that beefy, so I might need to move up to an ARM, which means moving into Linux and much more developed networking stacks. It would be a solved problem from that perspective, and the weight and power differences aren't too big...

Like with the DHT11 temperature sensor, we'll need to add a couple of libraries to the Arduino IDE: XbeeWifi.cpp and XbeeWifi.h. Both can be found on this page, along with some examples for how to use it in code. You'll have to goto your Arduino/Libraries folder and make the /XbeeWifi folder, then copy the text for those files and save them in the /XbeeWifi folder.

Restart Arduino, and the libraries should be good to go. 

I'm still working on this part of the project. Check back later for more info!

No comments:

Post a Comment