Arduino Yun

SKU: A000008

Retired Product

Replaced by: CE06443
This product has been replaced by: CE06443
This product is no longer available. This page is only for reference.

This Arduino Board uses the ATmega32u4 (datasheet) alongside the Atheros AR9331 for all of your maker needs. The Atheros CPU supports a lightweight Linux distribution named Linino OS. The board has built-in Ethernet and WiFi support, a USB-A port, micro-SD card slot, 20 digital input/output pins (7 of them can be used as PWM outputs and 12 as analog inputs), a 16 MHz crystal oscillator, a micro USB connection, an ICSP header, and 3 reset buttons.

The Yún is different to other Arduino boards due to its ability to communicate with the Linux distribution onboard.  This offers a powerful networked computer with the ease of an Arduino. In addition to Linux commands like the cURL, you can write your own shell and python scripts for robust interactions.

The Yún is similar to the Leonardo with the ATmega32u4, except that it has Linux on board. (has built-in USB communication, eliminating the need for a secondary processor).

The new Arduino Yun R5 differs substantially from the previous release in these features:

  • The power supply system provides 5V on AREF;
  • The layout has been modified, adding two holes for USB signals and two holes for GP6 and GPIO13(LED2).

Arduino Yun Specifications

Power

The best way to power the Yun is via the micro-USB connection with 5VDC Power Supply.

You can power the board through the Vin pin, but you have to supply a regulated 5VDC as there is no onboard regulator. Higher Voltages will simply damage the board.

The Yún is also compatible with Power over Ethernet (PoE) power supply, however, you will need to connect the PoE device to your board (or buy one preassembled)

The power pins are as follows:

  • VIN. The input voltage to the Arduino board. Unlike other Arduino boards, if you are going to provide power to the board through this pin, you must provide a regulated 5V.
  • 5V. The power supply used to power the microcontrollers and other components on the board. This can come either from VIN or be supplied by USB.
  • 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
  • GND. Ground pins.
  • IOREF. The voltage at which the i/o pins of the board are operating (i.e. VCC for the board). This is 5V on the Yún.

Memory

The ATmega32u4 has 32 KB (with 4 KB used for the bootloader). It also has 2.5 KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).

The memory on the AR9331 is not embedded inside the processor. The RAM and the storage memory are externally connected. The Yún has 64 MB of DDR2 RAM and 16 MB of flash memory. The flash memory is preloaded in factory with a Linux distribution based on OpenWrt called Linino OS. You can change the content of the factory image, such as when you install a program or when you change a configuration file. You can return to the factory configuration by pressing the "WLAN RST" button for 30 seconds.

The Linino OS installation occupies around 9 MB of the 16 MB available of the internal flash memory. You can use a micro SD card if you need more disk space for installing applications.

Input and Output

It is not possible to access the I/O pins of the Atheros AR9331. All I/O lines are tied to the 32U4.

Each of the 20 digital i/o pins on the Yún can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:

Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data using the ATmega32U4 hardware serial capability. Note that on the Yún, the Serial class refers to USB (CDC) communication; for TTL serial on pins 0 and 1, use the Serial1 class. The hardware serials of the ATmega32U4 and the AR9331 on the Yún are connected together and are used to communicate between the two processors. As is common in Linux systems, on the serial port of the AR9331 is exposed the console for access to the system, this means that you can access to the programs and tools offered by Linux from your sketch.

  • Pins 2 & 3 are used for TWI comms.
  • Pins 0, 1, 2, 3 & 7 are used for external interrupts, see the AttachInterrupt function description for more info.
  • PIns 3, 5, 6, 9, 10, 11, and 13 are all used for PWM. They allow for an 8-bit PWM output with the analogWrite() function.
  • SPI is available via the ICSP header, these pins are not connected to any Digital IO pins.
  • Pin 13 is connected to an on-board LED
  • The Yún has 12 analog inputs, labeled A0 through A11, all of which can also be used as analog or digital i/o. Pins A0-A5 appear in the same locations as on the Uno; inputs A6-A11 are on digital i/o pins 4, 6, 8, 9, 10, and 12 respectively. Each analog input provide 10 bits of resolution (i.e. 1024 different values). 
  • AREF. Reference voltage for the analog inputs. Used with analogReference().

There are 3 reset buttons with different functions on the board:

Arduino Yun Reset Functions

  • Yún RST. Bring this line LOW to reset the AR9331 microprocessor.
  • 32U4 RST. Bring this line LOW to reset the ATmega32U4 microcontroller.
  • WLAN RST. This button has a double feature. Primarly serves to restore the WiFi to the factory configuration. To restore your WiFi configuration you have to press and hold the WLAN RST button for 5 seconds. The second function of the WLAN RST button is to restore the linux image to the default factory image. To restore the linux environment you must press the button for 30 seconds. Note that restoring the factory image make you lose all the files saved and softwares installed on the on-board flash memory connected to the AR9331.

Communication

The Yún has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega32U4 provides a dedicated UART TTL (5V) serial communication. The 32U4 also allows for serial (CDC) communication over USB and appears as a virtual com port to software on the computer. The chip also acts as a full speed USB 2.0 device, using standard USB COM drivers. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB connection to the computer.

Digital pins 0 and 1 are used for serial communication between the 32U4 and the AR9331.
You can use Ciao library to communication between the processors.

Arduino Yun Ciao

Arduino Ciao is an easy-to-use and powerful technology that enables Arduino sketches to communicate intuitively with the "outside World". It aims to simplify interaction between microcontroller and Linino OS, allowing a variety of connections with most common protocols, third-party services and social networks.

Ciao has been designed and developed to be modular and easily configurable. Its goal is to support several connectors capable of interacting with the system resources (filesystem, console, memory) and to communicate with the most common and useful protocols (XMPP, HTTP, WebSocket, COAP, etc..) and applications (Jabber, WeChat, Twitter, Facebook, etc.).

Ciao Library is a lightweight library that can be used inside sketches for MCU to send and receive data, via serial communication, in a simple and intuitive way.
A SoftwareSerial library allows for serial communication on any of the Yún's digital pins. Pins 0 and 1 should be avoided as they are used by the Bridge library.
The ATmega32U4 also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus;. For SPI communication, use the SPI library.

The Yún appears as a generic keyboard and mouse, and can be programmed to control these input devices using the Keyboard and Mouse classes.

The onboard Ethernet and WiFi interfaces are exposed directly to the AR9331 processor. To send and receive data through them, use the Bridge library.

The Yún also has USB host capabilities through Linino OS. You can connect peripherals like USB flash devices for additional storage, keyboards, or webcams. You may need to download and install additional software for these devices to work.

Programming

The Yún can be programmed with the Arduino software (download). Select "Arduino Yún from the Tools > Board menu (according to the microcontroller on your board).

The ATmega32U4 on the Arduino Yún comes preburned with a bootloader that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the AVR109 protocol.

You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header using Arduino ISP or similar.

Automatic (Software) Reset

Rather than requiring a physical press of the reset button before an upload, the Yún is designed in a way that allows it to be reset by software running on a connected computer. The reset is triggered when the Yún's virtual (CDC) serial / COM port is opened at 1200 baud and then closed. When this happens, the processor will reset, breaking the USB connection to the computer (meaning that the virtual serial / COM port will disappear). After the processor resets, the bootloader starts, remaining active for about 8 seconds. The bootloader can also be initiated by pressing the reset button on the Yún. Note that when the board first powers up, it will jump straight to the user sketch, if present, rather than initiating the bootloader.

Because of the way the Yún handles reset it's best to let the Arduino software try to initiate the reset before uploading, especially if you are in the habit of pressing the reset button before uploading on other boards. If the software can't reset the board you can always start the bootloader by pressing the reset button on the board.

USB Overcurrent Protection

The Yún has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed.

Physical Characteristics

The maximum length and width of the Yún PCB are 2.7 and 2.1 inches respectively, with the USB connector extending beyond the former dimension. Four screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins. Weight of the board is 32 g.

Pin Out

Arduino Yun Pin Out

 

 

This product is listed in:

Retired

Product Comments

Exact shipping can be calculated on the view cart page (no login required).

Products that weigh more than 0.5 KG may cost more than what's shown (for example, test equipment, machines, >500mL liquids, etc).

We deliver Australia-wide with these options (depends on the final destination - you can get a quote on the view cart page):

  • $3+ for Stamped Mail (typically 10+ business days, not tracked, only available on selected small items)
  • $6+ for Standard Post (typically 6+ business days, tracked)
  • $10+ for Express Post (typically 2+ business days, tracked)
  • Pickup - Free! Only available to customers who live in the Newcastle region (must order online and only pickup after we email to notify you the order is ready). Orders placed after 2PM may not be ready until the following business day.

Non-metro addresses in WA, NT, SA & TAS can take 2+ days in addition to the above information.

Some batteries (such as LiPo) can't be shipped by Air. During checkout, Express Post and International Methods will not be an option if you have that type of battery in your shopping cart.

International Orders - the following rates are for New Zealand and will vary for other countries:

  • $11+ for Pack and Track (3+ days, tracked)
  • $16+ for Express International (2-5 days, tracked)

If you order lots of gear, the postage amount will increase based on the weight of your order.

Our physical address (here's a PDF which includes other key business details):

Unit 18, 132 Garden Grove Parade
Adamstown
NSW, 2289
Australia

Take a look at our customer service page if you have other questions such as "do we do purchase orders" (yes!) or "are prices GST inclusive" (yes they are!). We're here to help - get in touch with us to talk shop.

Have a product question? We're here to help!

Write Your Own Review

Guides

The Maker Revolution

The Maker Revolution celebrates the creation of new devices and the modification of existing ones - ...
The Maker Revolution celebrates the creation of new devices and the modification of existing ones - ...

Projects

Accurate IoT Clock With ESP8266

Being punctual is important. Hence accurate time is required. Clocks tend to miss out when it comes...
Being punctual is important. Hence accurate time is required. Clocks tend to miss out when it comes...

Days2Bin: Pico Powered Bin Reminder

Our recycle bin is collected fortnightly, but I can never remember which week, and the printed cale...
Our recycle bin is collected fortnightly, but I can never remember which week, and the printed cale...

Raspberry Pi Video Looper Display Installation | Overshare Video Festival

IntroductionA suspended ceiling display of forty repurposed screens and displays, each screening cr...
IntroductionA suspended ceiling display of forty repurposed screens and displays, each screening cr...
Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.