Blog Home

The Yún Way: less time debugging and more time inventing

Zoe RomanoSeptember 23rd, 2013
Back then secret device, back then secret Yun.


Today I’m happy to welcome Sven Kräuter as guest blogger on the Arduino Yún, as part of a series of posts exploring different unique features of our new board.

Sven works with Julia Kümmel focusing on agile & lean processes for soft- and hardware product development and together create projects at the intersection of the physical and the digital world, mostly using Arduino. His post below was orginally published at this link.


This summer I had a speaker engagement at the Codemotion conference in Berlin which I really enjoyed for many reasons. For starters Jule & me participated in an inspiring wearable computing workshop where we met Zoe Romano for the first time. The next day I talked about a possible and easy way how to build the internet of things.

Presenting thoughts on & actions how to build the IOT.

After the talk it seemed to appear like a a good idea to Zoe that I should get a sneak peek at some new Arduino hardware. There weren’t any more details since it was still secret back then. Of course it didn’t took me much time for consideration since I really love Arduino for making our hardware prototyping so much easier. I happily agreed on checking out this new mysterious device.

The talk was about how to connect anything to the internet using an open source framework I initiated called the Rat Pack, so I assumed it had to do something with online connectivity or that something had to be connected to the internet. Turns out it was about both ;-).

Making things talk with each other online (source: slideshare).

When Zoe told me about the Arduino Yún I was immediately stoked: an Arduino Board equipped with wi-fi, plus being able to access a small real time Linux system. How awesome is that? Exactly. I couldn’t wait to get hold of the Yún, and when it finally arrived it became quite obvious to me that I had a well thought and rounded product in my hands. Before I really knew what hit me this thing took shape on our balcony (see pic at the beginning of this post)

I’ll skip the amazing deeper tech details if you don’t mind (Uploading via wireless LAN, remote debugging, SSH access, Ruby on your Yún…). If you do mind please tell me, I’m glad to blog about them too ;-). I’ll just give you a rough outline of the journey I went through with the Yun so far.

The first idea was to integrate it into the Rat Pack ecosystem. Adapting the Arduino client code of the rat pack was fairly easy, it simply uses Linux shell commands on the Yun instead of putting the HTTP command together in the Arduino C code. It’s just a small detail but dramatically reduces the complexity of your project. You don’t have to implement the HTTP calls yourself, you can rely on the work horse that Linux is.

Being inspired by this first success with the Yún I thought maybe I could reduce complexity of the prototype of a device that we use to welcome guests at our place. I’m talking about the Bursting Bubbles Foursqaure Switch.

Foursquare & Arduino powered soap bubble machine.

When you check in to our balcony with foursquare, a soap bubble machine starts filling the air with bursting bubbles. The first prototype uses Arduino connected to an XBee Wifly to control the soap bubble machine and a Rat Pack server that handles the Foursqaure API.

Initial approach with lots of moving parts(tm).

Quite complex and actually and as you might have guessed the Yún helped reducing both the software and the hardware complexity drastically. Adding it to the project made it possible to cut off a lot of fat. Actually it now only consists of the Yun connected to the soap bubble machine.

The Yun way.

What’s true for the hardware is also true for the software. Have a look at the code base. Reduced comlpexity is achieved by processing the response of the Foursquare API on Linino as opposed to letting the Ruby server take care of it. And although there’s much debate when it comes to JSON processing with regular expressions in general, I just used grep and a matching regexp to extract the information from Foursquare’s JSON response. The parts marked green are the only ones necessary after adding the Yun to the setup.

Losing some pounds. Or rather kilobytes…

For us at making things happen the Yún will also be the platform of choice for our Internet Of Things workshops. Until now we use Arduinos and XBee WiFlys since they turned out to be the most robust solution for introducing a group of people to the principles of connecting things to the internet.

Current ‘IOT Basics’ workshop setup.

Although this works most of the time there is still time needed to wire things up and debug the hardware the participants build. With the Yún we can reduce the time necessary for setting things up and debugging the custom setup and use it to concentrate on spreading our knowledge on the subject. Actually you only need two wires for the basic Rat Pack example when using the Yún:

Future workshop setup: drastically reduced wiring effort.

So on the bottom line I see the Arduino Yún as a major milestone in making the internet of things available to a broader audience and empowering fellow makers and tinkerers to spent less time debugging and more time inventing.

Less complexity = more time for creativity (source: twitter).

It will also make our workshops far less complex and let the participants concentrate less setting things up and focus on their creativity.

I did not use all of it’s features yet, I’m more than curious to explore more of it. The feature I’ll focus on next is the possibilities of actually using the pins of your Arduino via RESTful web service. I guess I’ll keep you posted about that. Thanks Arduino for this awesome device and thanks for letting me have a look at it a little earlier. It seems like the beginning of a wonderful friendship…