Tag Archives: Bridge

Orders kick off for Arduino’s Yún

The Atmel-powered Arduino Yún can now be snapped up for $69, or €52. The  Yún – 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. As previously discussed on Bits & Pieces, the Yún is somewhat unique in the Arduino lineup, as it boasts a lightweight Linux distribution to complement the traditional microcontroller (MCU) interface.

The Yún also features WiFi and Ethernet connections, enabling the board to communicate with networks out of the box. In addition, the Yún’s Linux and Arduino processors link through the Bridge library, allowing 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.

Alongside the new board, Arduino has rolled out IDE 1.5.4  with a number of general bug fixes and new features, including:

  • Board recognition – The IDE recognizes the type of board Makers and engineers are working with every time an Arduino is connected.
  • Memory – When a sketch is uploaded, the IDE displays just how much memory is being used.
  • Copy Error button: Users can more easily copy and paste errors to share in various forums.

The Arduino Yún can be ordered here. Additional information about the Yún’s hardware and key specs are available here, while a detailed explanation of the Yun’s bridge can be read here.

Understanding the Arduino Yún’s Bridge

The Arduino Yún is based on Atmel’s ATMega32u4 microcontroller (MCU) and also features the Atheros AR9331, an SoC running Linino.

Earlier this week, Bits & Pieces took a closer look at the board’s hardware and today we’ll be getting up close and personal with the Arduino Yún’s Bridge, describing how it helps facilitate communication between the two processors.

According to Arduino’s Federico Vanzati, the Bridge comprises two distinct parts. The first, written in Python, runs on the GNU/Linux processor and is tasked with three primary functions: Executing programs on the GNU/Linux side, providing a shared storage space for data and receiving/relaying commands from the Internet – passing them directly to the Arduino.

Meanwhile, the other part of Bridge is the library that runs on the 32U4, allowing users to access the Linino parts of Bridge through their sketches.

“With the Bridge you can do some awesome things by communicating between the 32U4 and the AR9331 processors,” Federico explained. “Some examples could be commanding and controlling your sketch over the Internet from a remote location, accessing remote APIs to get data for your sketch to process, or executing programs or scripts too complex to write in an Arduino sketch.”

For example, says Federico, if someone at home wanted to know if their office or workspace was comfortable enough to work in, they can simply connect a LDR sensor and thermistor to the Yún on a wireless network.

“Your sketch can access the board’s shared storage to publish the readings every second to a webpage running on the AR9331. By accessing the URL http://arduino.local/data/get you can call up those readings, letting you know if it’s bright enough but not too hot to get to work on your next project. Your sketch could also store the sensor readings on a Google Drive spreadsheet or publish them on Facebook,” he added.

In addition, the Bridge eliminates the need to upload a new version of a sketch to change text on an LCD screen, as sketches can use the shared storage to read the text to display, changing it remotely from a browser using REST based calls. Meaning, if the text to be displayed is identified by the label “lcd_text,” accessing the URL http://arduino.local/data/put/lcd_text/Hello%20World will show “Hello World” on the LCD.

Interested in learning more about the Yún’s Bridge? You can check out Arduino’s official “hands-on” guide to the Bridge here.