Lately, I’ve been working with Arduinos. If you don’t know what that is, it’s essentially a way for anyone to build their own intelligent hardware. There is a microcontroller (essentially, a really small and underpowered CPU), infrastructure to support programming it, and a series of ports that can be connected to sensors, motors, and the like.
The Arduino has two major advantages that catapulted it into consciousness: it is open source, which makes it really easy to debug and extend; and it is exceedingly well-documented and reliable. That means that your projects will typically be hindered by your soldering and plugging skills, and not by figuring out how to work around some limitation of the IDE or software libraries.
I cannot tell you why I have been playing/working with the Arduino yet, as the project is super-secret. Suffice to say that I have enjoyed the play/work a whole lot. Things I never thought were within my reach suddenly became easy. Where I thought I’d have to get another degree in Electrical Engineering, I now simply place a few parts together and tell them to play nicely with each other.
The Arduino, despite its grand fabulousness, has the major drawback of being gigantic. It is about the size of the palm of a hand, or a tin of Altoids. Since what it does typically fits in tiny gadgets like the iPod Shuffle, it is clear that you could create a smaller version of it, if you wanted. The need has been heard and a series of smaller boards have been made by different manufacturers.
There are fanciful versions like a wearable controller. There are two right now: the LilyPad and the FLORA. There are small versions without a USB connection. There are small versions with a Mini-USB port.
The one I liked the most, though, was the SparkFun Pro Micro. It comes in 3.3V and 5V variants (link is to the 5V variant, which is also clocked twice as fast as the 3.3V) and is truly tiny. It is so tiny, I constantly lose mine. Yet, they still have all the power of an Arduino.
But… It’s been frustrating. Working from a Linux machine, I connected as usual. The instructions tell you that the boards don’t work with the standard Arduino IDE and need extra drivers. They are helpfully provided right on the product page, and are easily installed.
Right off the bat, a problem: the drivers were recognized by the older version of the software, but the new version didn’t recognize them. You can see that when you go to the Board selection menu item: in Arduino 1.0.3 (the older, stable version of the software) the boards show up. In Arduino 1.5.2 (the newer beta), they do not. That’s annoying, because support always asks you to try it with the latest software.
I wanted to try the two versions and uploaded my software to the 3.3V. Worked flawlessly. Then I tried the 5V. No problem. Then I tried updating the software. Catastrophic failure. It wouldn’t recognize either board. It would just say it wasn’t a recognized board, or the board was not connected.
I’ll spare you the next many hours I spent debugging the issue and fixing it. Basically, the programming seems not to work in Linux. It does work under Windows. Only that Windows and COM ports are finicky, and I have to reboot my Windows 7 machine once in a while, or it won’t recognize the hardware anymore.
SparkFun seems to be entirely a Windows shop, judging by the comments in the product page. Requests for help with Linux are routinely answered with a shrug, which is strange, considering how many of the comments are from people using Linux. Most of the issues seem to arise with the inability to access the interface, which is remedied easily by changing permissions or updating using sudo. Nobody seems to report my problem, which indicates that either nobody made it that far, or that I am the only idiot with the problem.
[In case you have that problem, though, and shot your Pro Micro, you will need to reflash the bootloader. That all sounds terribly scary, but it isn’t. You will need an AVR programmer for the exercise, which you can get from a lot of different places, including SparkFun. If anyone is interested in details, I’ll post another blog.]