The Arduino Yún – which was designed in collaboration with Dog Hunter – is based on Atmel’s ATmega32u4 microcontroller (MCU) and also features the Atheros AR9331, an SoC running Linino, a customized version of OpenWRT. Now, one year later, the Yún celebrates its one-year anniversary! With over 9,200 forum posts, 8 OpenWrt-Yún releases and 492,000 search results, the AVR based board has become quite a hit for Makers. We think this deserves an Arduino high-five, for sure!
— Arduino (@arduino) September 12, 2014
Made available last September, the Yún was a somewhat unique addition to the existing Arduino line-up, as it boasts a lightweight Linux distribution to complement the traditional MCU interface.
Yún, which means “cloud” in Chinese, aspired to make it simple to connect to complex web services directly from Arduino. The board features WiFi and Ethernet connections, therefore enabling the board to communicate with networks out of the box. Additionally, the Yún’s Linux and Arduino processors link through the Bridge library, enabling Arduino sketches to send commands to the command line interface of Linux.
“The Arduino Yún has the same footprint as an Arduino Uno but combines an ATmega32u4 microcontroller (the same as the Leonardo) and a Linux system based on the Atheros AR9331 chipset,” Arduino’s Federico Vanzati explained. “Additionally, there are built-in Ethernet and WiFi capabilities. The combination of the classic Arduino programming experience and advanced internet capabilities afforded by a Linux system make the Yún a powerful tool for communicating with the internet of things (IoT).”
According to Vanzati, the Yún’s layout keeps the I/O pins the same as the Leonardo and is therefore compatible with the most shields designed for Arduino.
“With the Yún’s auto-discovery system, your computer can recognize boards connected to the same network. This enables you to upload sketches wirelessly to the Yún,” he continued. “You can still upload sketches to the Yún through the micro-USB connector just as you would with the Leonardo.”
On the connectivity side, the Yún is equipped with two separate network interfaces, a 10/100 Mbit/s Fast Ethernet port and a IEEE 802.11 b/g/n standard compliant 2.4GHz WiFi interface, supporting WEP, WPA and WPA2 encryption. As expected, the WiFi interface can also operate as an access point (AP). In AP mode any WiFi enabled device can connect directly to the network created on the Yún. While a Yún in this mode can’t connect to the internet, it could act as a hub for a group of WiFi enabled sensors.
As Vanzati notes, interfacing Arduino with web services has historically been rather challenging due to memory restrictions.
“[However], the Yun’s Linux environment simplifies the means to access internet services by using many of the same tools you would use on your computer,” he said. “You can run several applications as complex as you need, without stressing the ATmega microcontroller.”
To help engineers and Makers develop applications that can connect to popular web services, Arduini has partnered with Temboo, a service that simplifies accessing hundreds of the web’s most popular APIs. In fact, a Temboo library is packaged with the Yún, making it easy to connect to a large variety of online tools.
Facilitating a seamless connection between the two processors is achieved via the Yún’s Bridge library, which connects the hardware serial port of the AR9331 to Serial1 on the 32U4 (digital pins 0 & 1).
“The serial port of the AR9331 exposes the Linux console (aka, the command line interface, or CLI) for communication with the 32U4,” Vanzati confirmed. “The console is a means for the Linux kernel and other processes to output messages to the user and receive input from the user. File and system management tools are installed by default. It’s also possible to install and run your own applications using Bridge.”
Of course, the ATmega32u4 can also be programmed from the AR9331 by uploading a sketch through the Yún’s WiFi interface. When connected to the same WiFi network as your computer, the board will appear under the “Port” menu of the Arduino IDE. The sketch will be transferred to the AR9331 and the Linux distribution will program the ATmega32u4 through the SPI bus, emulating an AVR ISP programmer.
Last, but certainly not least, the Yún can be powered through the micro-USB connector, the Vin pin, or the optional Power Over Ethernet (POE) module. When powering the board though the Vin pin, users must supply a regulated 5VDC, as there is no on-board regulator for higher voltages.
As we come together to celebrate the Yún’s birthday, feel free to browse the latest projects powered by the board or access more information on the board’s official page here.
Don’t forget to join the Atmel team in Queens later this week for the 5th Annual World Maker Faire. Undoubtedly, this year will be amazing as an expected 750+ Makers and 85,000+ attendees head to the New York Hall of Science to see the latest DIY gizmos and gadgets, as well as AVR Man in the flesh. Once again a Silversmith Sponsor of the event, Atmel will put the spotlight on everything from Arduino to Arduino-related projects. See you soon!