A Brief Introduction to the Arduino

Arduino:http://www.flickr.com/photos/remkovandokkum/2667608562/in/set-72157606159601535/

For Christmas, I got an Arduino. Well, really I got two coffee pots. Identical ones. So I returned one of them to Amazon, and used the refund to buy an Arduino starter kit. It’s a neat device, with a ton of potential. Here’s why.

Ok, so what is it?

The Arduino is an open, hackable microcontroller, designed to be easy to program and easy to build things with. Simply put: the ultimate hacker toy.

For about \$40 (or less, if you want to buy all the parts and build it yourself), you can have a device that you can program from any computer with a USB port, and that is capable of interfacing with the outside world. It doesn’t require any special training in electronics, and is ideal for experimentation. You can add an amazing array of sensors and add-on boards to allow you to do just about anything you can imagine, from reading the temperature to getting GPS coordinates.

Did I mention you can program it in Ruby?

What can you do with it?

Pretty much anything you want. You can start by making an LED blink - this is the hardware equivalent to “Hello, world”. Beyond that, the basic board comes with an array of inputs and outputs that you can connect up to all sorts of things: temperature and light sensors, motors, GPS modules. You name it, you can build it.

Here’s a quick rundown of a few things people have used these for.

This is only a fraction of what’s out there. An impressive community has sprung up around these little guys, and there is no shortage of cool projects documented on the web.

If you want to see the Arduino in action, check out Greg Borenstein’s presentation from RubyConf on programming the Arduino with Ruby, in which he demos an Arduino-based drum machine (literally, a machine that plays a drum with chopstics) as well as a board that uses windshield washer fluid pumps to mix screwdrivers. It’s one of the most entertaining talks I’ve seen.

Summary

In summary, if you’ve ever wanted to play with hardware, the Arduino is the place to start. It’s inexpensive, easy to use, and endlessly customizable. I’ve had mine a week and it’s been great fun so far.

  • liquidware open source electronics A provider of Arduino boards and addon boards
  • Tutorials A collection of tutorials from the official Arduino site
  • RAD - Ruby Arduino Development A tool to let you build Arduino apps uusing Ruby
  • Adafruit Industries Another provider of Arduino boards as well as other electronic paraphernalia.
  • LadyAda This site is run by Limor, proprieter of Adafruit Industries and contains a lot of tutorials on the Arduino and electronics in general.
  • SparkFun Provider of Arduino boards plus an array of other kits and projects.
  • Arduino Starter Kit This is the kit I bought. It includes everything you need to get started - even a USB cable.

Do you have an Arduino? Built anything cool with it? If so, share in the comments.

Photo by Remko Van Dokkum - Some Rights Reserved

The Coming Decline of Rss and Atom

Ever since I discovered Bloglines some years ago, I’ve been hooked on RSS. I subscribed to a slew of feeds and treated it like a to do list, always trying to get it to zero. Subscribing to those feeds enabled me to see and learn about a lot of things I wouldn’t have seen otherwise.

Since that time, RSS feeds have been my primary source of what’s new and interesting in the world of technology. Along the way, the feeds I was subscribed to changed, as my interests changed, and I gave up Bloglines for Google Reader. But my appetite for feeds has only grown.

Lately, though, I’ve seen a shift. Most days, I skim the headlines in Google Reader, looking for specific sites, without ever getting the unread count down to zero. What I’ve started noticing is that even when I was keeping up on RSS feeds, I had already seen all of the interesting stuff. The primary reason for this is Twitter.

Twitter is my social network of choice. Yes, I’m on Facebook (though I succesfully avoided it for a long time), and I’m also on LinkedIn, but the place I spend most of my social networking time is Twitter. Most of the people whose blogs I’ve come to rely on for news and insight are people I follow now on Twitter. I get more frequent links and thoughts through that site than I ever would through a blog, and it’s much more real-time than RSS. There are a number of sites which even offer to send you notifications of new content through Twitter in addition to RSS, like RubyFlow.

Additionally, I think sites like Reddit and Hacker News are having a similar impact. Their voting functions help to filter through the haystack to find the best stuff and ensure that it rises to the top - at least in theory, I’m not convinced that it always works in practice.

Perhaps the future of RSS and Atom lie as protocols that enable applications to share information rather than as a consumer-facing application of it’s own. They’re the plumbing, not the faucet.

While I still use RSS, and won’t likely be shutting down Google Reader any time soon, I find that the interesting things seem to find me, rather than me having to wade through feed after feed to find them. This is a byproduct of me being connected to a group of people on Twitter with similar interests, who share things as they come across them. I’m questioning whether my use of RSS will decline as I consume more information this way.

I’m curious if anyone else is experiencing the same thing.

In Defense of Twitter

Twitter bashing has become a bit of a past-time for some people. I don’t think that the criticism leveled at Twitter is fair or accurate. It is generally based on a misunderstanding of the technical problems they are facing. In the case of TechCrunch, it’s a desire to drive traffic to the TechCrunch website by fabricating conflict and making personal attacks.

Twitter has had a hard time scaling. This is obvious to anyone that uses the service, and is readily admitted by the people behind Twitter. The present problems have brought out all of the Armchair Architects, and I’ve seen a lot of commentary stating “I don’t understand why this is so hard, all you need to do is [insert gross over-simplification of the problem here]”. It’s very easy to apply some 2020 hindsight to this problem, but another thing entirely to be in the trenches day after day working to keep Twitter up and running while trying to make large-scale changes to fix the underlying problems.

Here’s the thing. Twitter was started as a side-project inside Odeo. It was developed in Ruby on Rails, the same tool that they had used successfully to build Odeo. While this choice is a major discussion point for their critics, it seems to me to have been a very reasonable decision. Ruby on Rails was what they were familiar with, and at first glance seems to be a good fit. I suspect most people would have made the same decision, given the same situation. The bottom line: They made the best decision they could, based on what they knew at the time. Keep in mind that nobody even knew whether Twitter would gain any traction - certainly none of them could have anticipated the warm reception it has been given.

Obviously their existing architecture isn’t working. The fine folks at Twitter have figured this out, and they are busy rebuilding the system to handle the current load and scale accordingly. This isn’t an overnight fix - it will take time to rebuild Twitter with all-new innards. Let’s be patient. Frankly, the internet needs to take a collective chill pill on this topic.

If you’re not following me on Twitter, you can remedy that here.

Cool OS X Application: Shelf


One of the most useful ideas I’ve seen in the past few years was Dashboard. Dashboard was an open source project launched by Nat Friedman of Ximian (since acquired by Novell). It’s aim was to provide a “dashboard” of information relevant to you while you were doing work. If you were having an IM conversation with your friend Bob, it would show you the last few emails Bob had sent you, previous IM conversations with Bob, Bob’s contact information from your address book, etc.

I had always thought that Dashboard was an intriguing concept, and one of the few examples of real innovation on the desktop that I have seen in a while. It was a bit dissapointing to see the project get sidelined, but these things happen.

A project emerged recently for OS X that is based on the same concepts, although implemented differently. It’s called Shelf and is written by Tom Insam who is a developer at Dopplr (though all indications are that this is an independent project and not supported or endorsed by Dopplr).

Shelf watches the applications you are using in OS X, and displays relevent information from applications local to your computer as well as web sites (like Dopplr, naturally). Here is Tom’s own description from the Shelf website:

Shelf is an app for MacOS that looks at the current foreground application, and tries to figure out if what you’re looking at corresponds to a person in your Address Book. Then it’ll tell you things about them. … Just run it. It’ll sit in the background, and watch the foreground application. If it can tie something you’re looking at (the current url in your web browser, for instance, or the target of an open chat) to a person in your Address Book, it’ll open a window and show you their name and picture, and it’ll try to fetch RSS feeds for any URLs in their address card.

Although it’s a newer project (only at version .13), Shelf seems to be off to a promising start. It provides hooks into a number of different applications on OS X already (according to the Shelf site):

  • Safari - looking at the foreground url, and for microformats in the source of the current page.
  • Firefox - looking at the foreground url.
  • Mail.app - From the email address of the sender of the currently selected email.
  • NetNewsWire - From the homepage url of the currently selected feed item.
  • Twitterrific - From the homepage or twitter page urls of the currently selected tweet.
  • Adium - From the IM username of the current conversation.
  • iChat - From the IM username of the current conversation.
  • Address Book - The currently selected person.

This is an idea whose time has come, I think. There are obviously some gaps here, for example if you use GMail as your email application (as I do), or Google Reader for RSS feeds. Integrating with all of these applications is a tricky problem, but it’s not insurmountable. I think it’s certainly worth solving though, as the benefits could be huge.

I hope this project doesn’t fall by the wayside, as it has too much of a potential impact on the way we work. It’s possible that Apple will implement something similar, it seems like the next logical progression of Spotlight.

Are there any other tools like this out there?

How to Make Sortable Tables in Textile

One of my favorite organizational tools is Instiki. I use it for note-taking, maintaining reference information, and keeping lists. I have several lists that I keep in tables, and the other day I had need to make them sortable. Here’s how I did it.

The first thing you need is Stuart Langridge’s sorttable Javascript library. This is a library that allows you to make any table sortable, just by giving it a class of “sortable”, and a unique ID. It’s smart enough to figure out how to sort most kinds of data, so it will sort a date column as a date, and a number column as a number. Very cool piece of code. Anyway, take this Javascript file and put it in the the public/javascripts directory for your Instiki installation.

Next, start editing the page with the table that you want to make sortable. At the top add the following declaration:

Next we’ll modify the table. Usually tables in Textile look something like this:

 |ID|Name| |1|Joe Smith| |2|Susie Jones| |3|Bob Barker| 

We need to add a table declaration and associated modifier in order to give it a CSS class of sortable, and a unique ID:

 table(sortable#mytable) |ID|Name| |1|Joe Smith| |2|Susie Jones| |3|Bob Barker| 

The class name has to be “sortable”, but the ID (the part after the #) can be anything you want as long as it’s unique.

Save your changes, and you should now be able to sort by any column in your table.