Arduino Yún - first impressions
The Arduino Yún is the latest addition to the Arduino range, and it looks very exciting.
In this post I'm assuming that you are familiar with the Arduino and with Linux; I may write a beginner's introduction later.
The Yún combines the features of a traditional Arduino with a tightly-coupled Linux System-on-a-chip (SoC). The two are seamlessly connected via SPI using a Bridge class on the Arduino and some Python code on the Soc.
Easy internet connectivity
The Yún's Linux SoC makes it easy to integrate physical computing projects with the Internet. Previously you'd have needed an Ethernet shield or an Ethernet Arduino, using a fairly limited API which was not always reliable. The Yún gives you many different ways to connect you applications to the internet. Some are useful but very simple; some will take longer to master but look extremely flexible.
Shield Compatibility
The Yún follows the form factor of its predecessors, so you can use it with many existing shields, or breadboard it as you would a traditional Arduino prototype. To develop software for the Yún you'll need a compatible version of the Arduino development environment. At the time of writing that's version 1.5.4, described as a beta though it's worked well so far in my limited experiments.
Connecting to the on-board Linux SoC
There's quite a bit of information about using the Yún on the Arduino website, including a getting started guide. I leapt in without following its process; I connected the Yún to its micro-USB cable, plugged in an Ethernet cable, and fired up the Arduino IDE. When I looked at the ports menu of the IDE, I could see an entry for an Arduino Yún at IP address 192.168.1.69. I connected to it as root using ssh and was rewarded with the logon screen of the embedded Linux processor:
Connecting to the network Console
Next I tried a quick code example from the Arduino website which uses the bridge to connect to the network-based console. It worked perfectly. The example lets you turn a LED on or off via a remote connection, and suggests a whole range of potential applications.
Connecting to Temboo
Encouraged by that, I tried the new temboo interface. Temboo offers a simple RESTful API that can access hundreds of different services from different vendors. Among them is an API that can access Google's geocoding service, which converts a Postcode into Latitude and Longitude.
It takes under a minute to sign up for a free account with temboo; once you have done so, you can use their API from a browser, from a program on your desktop computer, from a phone or tablet, or from your Arduino Yún.
When I tried the example I got confused by the fact that the Yún has two serial consoles available. One is USB-based, the other is telnet-based, and the temboo sample code uses the USB version. Once I'd got that sorted out, I could see my Yún connecting via temboo to Gooogle's geocoding API and correctly displaying my geocoded postcode.
Much more to explore
There's a huge amount of functionality available for the Yún, and it's going to take a while to explore it all. I have two other projects on the go at the moment, but I suspect I won't be able to resist the lure of the Yún for long!
In this post I'm assuming that you are familiar with the Arduino and with Linux; I may write a beginner's introduction later.
The Yún combines the features of a traditional Arduino with a tightly-coupled Linux System-on-a-chip (SoC). The two are seamlessly connected via SPI using a Bridge class on the Arduino and some Python code on the Soc.
Easy internet connectivity
The Yún's Linux SoC makes it easy to integrate physical computing projects with the Internet. Previously you'd have needed an Ethernet shield or an Ethernet Arduino, using a fairly limited API which was not always reliable. The Yún gives you many different ways to connect you applications to the internet. Some are useful but very simple; some will take longer to master but look extremely flexible.
Shield Compatibility
The Yún follows the form factor of its predecessors, so you can use it with many existing shields, or breadboard it as you would a traditional Arduino prototype. To develop software for the Yún you'll need a compatible version of the Arduino development environment. At the time of writing that's version 1.5.4, described as a beta though it's worked well so far in my limited experiments.
Connecting to the on-board Linux SoC
There's quite a bit of information about using the Yún on the Arduino website, including a getting started guide. I leapt in without following its process; I connected the Yún to its micro-USB cable, plugged in an Ethernet cable, and fired up the Arduino IDE. When I looked at the ports menu of the IDE, I could see an entry for an Arduino Yún at IP address 192.168.1.69. I connected to it as root using ssh and was rewarded with the logon screen of the embedded Linux processor:
Connecting to the network Console
Next I tried a quick code example from the Arduino website which uses the bridge to connect to the network-based console. It worked perfectly. The example lets you turn a LED on or off via a remote connection, and suggests a whole range of potential applications.
Connecting to Temboo
Encouraged by that, I tried the new temboo interface. Temboo offers a simple RESTful API that can access hundreds of different services from different vendors. Among them is an API that can access Google's geocoding service, which converts a Postcode into Latitude and Longitude.
It takes under a minute to sign up for a free account with temboo; once you have done so, you can use their API from a browser, from a program on your desktop computer, from a phone or tablet, or from your Arduino Yún.
When I tried the example I got confused by the fact that the Yún has two serial consoles available. One is USB-based, the other is telnet-based, and the temboo sample code uses the USB version. Once I'd got that sorted out, I could see my Yún connecting via temboo to Gooogle's geocoding API and correctly displaying my geocoded postcode.
Much more to explore
There's a huge amount of functionality available for the Yún, and it's going to take a while to explore it all. I have two other projects on the go at the moment, but I suspect I won't be able to resist the lure of the Yún for long!
This is truly another great platform for more adventurous Arduino affectionados. It is now just waiting for the right applications to take full advantage of it.
ReplyDelete