The Wifi and Arduino odyssey continues.
Having done a bit more research and after a consultation with the good people on the NYC Resistor mailing list, I've come to accept the fact that this is going to be more than a weekend project. All in all I feel as though I'm about to have a very authentically Arduino experience, where after a few initial cries of "What the hell, this is an easy problem, why hasn't someone else solved this for me?" you roll up your sleeves and settle in for a nice, soul-sucking learning experience. In hindsight I guess there's no reason for anyone to expect for it to be easy to take a difference in voltage, translate it into a digital value, encode those bits into radio waves and beam them across a room, receive that radio signal and turn it back into bits, and finally send those bits to a specific place in a specific application, all without doing any setup or configuring anything. The fact that I'm even trying to solve this problem instead of, you know, eating lice out of my friend's beard is a testament to the advancement of human society. But even though iCloud and iBooks and AirPort and WiFi make seamless wireless communication looks easy, from an objective, physical standpoint it's right up there with gene splicing. Which, I've come to learn isn't actually that hard, but that's another post.
If you're hoping for a clear, concise write-up that takes you all the way from an Arduino and a credit card to a zeroconf WiFi ballet, then you might want to put away the vuvuzela because we're not quite ready to celebrate yet. I haven't even narrowed it down to a specific Arduino shield. I have, however, sifted through the cruft and started to cobble together some of the more promising pieces of wares hard and soft.
Having done a bit more research and after a consultation with the good people on the NYC Resistor mailing list, I've come to accept the fact that this is going to be more than a weekend project. All in all I feel as though I'm about to have a very authentically Arduino experience, where after a few initial cries of "What the hell, this is an easy problem, why hasn't someone else solved this for me?" you roll up your sleeves and settle in for a nice, soul-sucking learning experience. In hindsight I guess there's no reason for anyone to expect for it to be easy to take a difference in voltage, translate it into a digital value, encode those bits into radio waves and beam them across a room, receive that radio signal and turn it back into bits, and finally send those bits to a specific place in a specific application, all without doing any setup or configuring anything. The fact that I'm even trying to solve this problem instead of, you know, eating lice out of my friend's beard is a testament to the advancement of human society. But even though iCloud and iBooks and AirPort and WiFi make seamless wireless communication looks easy, from an objective, physical standpoint it's right up there with gene splicing. Which, I've come to learn isn't actually that hard, but that's another post.
If you're hoping for a clear, concise write-up that takes you all the way from an Arduino and a credit card to a zeroconf WiFi ballet, then you might want to put away the vuvuzela because we're not quite ready to celebrate yet. I haven't even narrowed it down to a specific Arduino shield. I have, however, sifted through the cruft and started to cobble together some of the more promising pieces of wares hard and soft.
Hardware:
1. RN-XV WiFly Module - Wire Antenna / $34.95 -- http://www.sparkfun.com/products/10822
Aww, look how cute it is! It's like a little red ladybug of nights spent alone rubbing your Arduino and router together in desperation. What's nice about this one is that it assumes you've already got a bunch of Arduinos and Arduino-related crap (which I do). Rather than requiring a whole new shield, this little module simply functions as a drop-in replacement to your XBee antenna. This means it's cheap, low-power and as an added bonus it means you can leave in place most of the hardware and software you'd already been using for XBee serial communication. If I already had some ad-hoc wireless Arduino solution up and running these would be huge plusses; as it is it's some relatively insubstantial but very tasty frosting. As with all the hardware modules it's able to handle 802.11 b/g and has the full TCP/IP stack, giving you DHCP, UDP, DNS, ARP, ICMP, HTTP client, FTP client and TCP. The only downside is that it's limited to 464Kbps, which isn't too slow but then even short people like high ceilings.
2. WiFi DiamondBack / $73.00 -- http://linksprite.com/product/showproduct.php?id=74&lang=en
While the other hardware solutions listed here take the form of some shield or module that you plug into your Arduino, the DiamondBack offers an Arduino with WiFi baked directly in. I'm hoping that this makes it akin to a MacBook for Arduino WiFi, in that what you lose in versatility and cost you make up in design and ease of use. This one rakes in big bonus points for having a QuickStart guide, as I believe that anything more complicated than a doorknob (which includes some doorknobs) ought to have a QuickStart guide. It also claims to work with the WiShield code base from LinkSprite, which appears to be the best documented and most complete Arduino ethernet code package out there. But more on that later. Finally it boasts transmission speeds of up to 2 Mbps, significantly faster than the RN-XV. Though you should probably take that claim with a grain of salt, as that's just the theoretical limit based on the hardware, not a reported speed. For a point of comparison on the cost, I think an Arduino retails for $30, so you're actually getting pretty outstanding value-for-money with this board, especially if you don't already have an Arduino.
3. Hydrogen / $75.00 -- https://diysandbox.com/our-products/arduino-shields/hydrogen
Well it's expensive as expensive balls, so presumably it's got some good features to make it all worthwhile. The first feature that strikes me is being ugly as a broken knee, but then again it is an Arduino shield, not a Japanese flower bouquet. Like the others this board is 802.11b and capable of handling TCP and UDP connections. In a very sneaky ploy to convince us that this is some kind of lightning-fast magic board the product is listed as 11 Mbps certified, with throughput TBD. Of course that limit and certification are actually features of the 802.11b protocol and not the hardware, so who knows how fast this board can actually send and receive data. The hardware for this board links to the WireFree ethernet library, an Arduino connection library specific to this board. The most exceptional and simultaneously mystifying feature of this board is the inclusion of a MicroSD card reader, maybe so it can beam embarrassing photos to everyone in WiFi range without your knowing? The board claims to be able to scan access points for RSSI information, which is actually an extremely cool feature that none of the other boards seem to offer, in addition to storing "two connection profiles for easy reconnection." Presumably it needs the SD card to store these profiles? But even the cheap SD cards are goddamned huge; I'm pretty sure I've got a few 4GB SD cards between my couch cushions. Are the connection profiles really that big? And what is easy reconnection? I guess I'll have to buy the board and see...
4. CuHead Shield / $55.00 -- http://www.linksprite.com/product/showproduct.php?lang=en&id=73
My gut tells me that this is the WiFi shield for me. It looks just like any other Arduino Shield. It's upfront and clear about which pins it uses. It uses the phrase "plug-and-play." It links to the WiShield library, my favorite so far. It even offers a user manual in PDF form, although the file name "cuhead_wifi_shield_user_manuel.pdf" reeks of French influence. It even brings out all the Arduino headers that it would ordinarily block out, so presumably you can just snap it onto your Arduino and get to work as if it wasn't even there. Awesome.
Software:
1. WiFly Shield -- https://github.com/jcrouchley/WiFly-Shield
I saw a very promising and very clear example usage of this code here, http://log.liminastudio.com/programming/getting-started-with-the-rn-xv-wifi-module-node-js, big big thanks to Tedbot at NYC Resistor for the link. This all bodes well, however the code is specific to the RN-XV. I can't find a license, so I'm assuming the hardware specificity means that they didn't bother.
2. Wirefree -- https://github.com/diysandbox/Wirefree
Ugh, GPL. I hate the GPL. At least with commercial code you can pay a license and then the code belongs to you. You can do whatever you want with it without having to feel the icy hand of capital "O"pen software on your shoulder the whole time. Using software with a GPL license is like being a teenager driving your dad's BMW: it's fun but you can never appreciate it because of the constant reminder that you're enjoying something that doesn't belong to you. Worse, every single line of code you write from that point on has to include the original GPL license, so you can't even claim ownership to your own code anymore. What the hell, man? I agree, software should be open and free, but it's Apple-level crazy to claim that I don't own something I wrote myself. What were we talking about again?
3. WiShield -- https://github.com/asynclabs/WiShield
I'm definitely leaning heavily in favor of this source code and any Arduino Shield that can use it. This code claims TCP and UDP sockets and has example code for configuring a web client, a web server and even for posting tweets. That's pretty fantastic; I always wanted to build a wireless sensor attached to a scale under my liquor cabinet that could tweet at me when I was running low. The only downside, and this is a weird one, is that the authors of this fabulous block of code, Async Labs Inc., are closing their doors. This could mean that the code won't be actively maintained anymore. It also says something very interesting about the fact that I can't find a software license attached to the code--maybe there is no software license? Or even if there is, who's going to enforce it?
And now I've bought them. The credit card is maxed out and my Christmas present/punishment to myself is on it's way. You'll be the first to know when I actually get some bits flying through the air. One last thing to mention: eventually it will be important to jump one last hurdle, the hurdle of asynchrony. Writing responsive code that also networks requires a solid grasp of asynchronous programming and some kind of kernel that can handle the threading. How will Arduino stand up to the task? How will I stand up to the task?
RSS Feed