Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Arduino Yun: Examples, Pinouts, and Specs

Image of Arduino Yun
Cirkit Designer LogoDesign with Arduino Yun in Cirkit Designer

Introduction

The Arduino Yun is a microcontroller board developed by Arduino that combines the functionality of a traditional Arduino board with built-in Wi-Fi capabilities. It is designed to simplify the development of Internet of Things (IoT) applications by integrating a powerful Linux-based system alongside the Arduino microcontroller. This dual-processor architecture allows for seamless communication between the microcontroller and the internet, making it ideal for projects requiring network connectivity.

Explore Projects Built with Arduino Yun

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ATmega328P-Based Sensor Hub with OLED Display and LIDAR
Image of TILTPCB: A project utilizing Arduino Yun in a practical application
This circuit features an Mtiny Uno ATmega328P microcontroller as its central processing unit, interfacing with a variety of sensors and peripherals. It includes a 0.96" OLED display and an MPU6050 accelerometer/gyroscope for user interface and motion sensing, respectively. The circuit also integrates a TF LUNA LIDAR for distance measurement, a DHT11 sensor for temperature and humidity readings, and uses a 9V battery with a 7805 voltage regulator for power management. Communication with a computer for programming and data exchange is facilitated by an Adafruit FTDI Friend module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Soil Moisture Sensor System
Image of YL-69: A project utilizing Arduino Yun in a practical application
This circuit consists of an Arduino UNO microcontroller connected to a YL-69 soil moisture sensor. The sensor's analog output (AOUT) is connected to the A1 analog input pin of the Arduino, allowing the microcontroller to read soil moisture levels.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO and ESP32 CAM Controlled Fire Detection and Alert System with GSM Notification
Image of ASO BOT: A project utilizing Arduino Yun in a practical application
This circuit features an Arduino UNO as the central microcontroller, interfaced with a variety of sensors, actuators, and modules. It includes a 5-channel fire sensor, temperature and humidity sensor (DHT11), two buzzers, and two servomotors controlled by an L293D driver shield. The circuit also integrates an ESP32 CAM for wireless capabilities, a 2-channel relay module controlling a mini water pump, an LCD display for user interface, a SIM 800L GSM module for cellular connectivity, and is powered by a 9V battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO R4 WiFi Controlled Potentiometer Level Display
Image of インジケータボリューム変調LED: A project utilizing Arduino Yun in a practical application
This circuit features an Arduino UNO R4 WiFi microcontroller connected to a TM1651 display module (referred to as 'YY') and a potentiometer. The Arduino controls the display via digital pins D2 and D3, which are connected to the DIO and CLK pins of the TM1651, respectively. The potentiometer's output is read by the Arduino's analog pin A0 and is used to adjust the display level on the TM1651, indicating a value that likely represents a battery level or similar variable input.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Arduino Yun

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of TILTPCB: A project utilizing Arduino Yun in a practical application
ATmega328P-Based Sensor Hub with OLED Display and LIDAR
This circuit features an Mtiny Uno ATmega328P microcontroller as its central processing unit, interfacing with a variety of sensors and peripherals. It includes a 0.96" OLED display and an MPU6050 accelerometer/gyroscope for user interface and motion sensing, respectively. The circuit also integrates a TF LUNA LIDAR for distance measurement, a DHT11 sensor for temperature and humidity readings, and uses a 9V battery with a 7805 voltage regulator for power management. Communication with a computer for programming and data exchange is facilitated by an Adafruit FTDI Friend module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of YL-69: A project utilizing Arduino Yun in a practical application
Arduino UNO Soil Moisture Sensor System
This circuit consists of an Arduino UNO microcontroller connected to a YL-69 soil moisture sensor. The sensor's analog output (AOUT) is connected to the A1 analog input pin of the Arduino, allowing the microcontroller to read soil moisture levels.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ASO BOT: A project utilizing Arduino Yun in a practical application
Arduino UNO and ESP32 CAM Controlled Fire Detection and Alert System with GSM Notification
This circuit features an Arduino UNO as the central microcontroller, interfaced with a variety of sensors, actuators, and modules. It includes a 5-channel fire sensor, temperature and humidity sensor (DHT11), two buzzers, and two servomotors controlled by an L293D driver shield. The circuit also integrates an ESP32 CAM for wireless capabilities, a 2-channel relay module controlling a mini water pump, an LCD display for user interface, a SIM 800L GSM module for cellular connectivity, and is powered by a 9V battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of インジケータボリューム変調LED: A project utilizing Arduino Yun in a practical application
Arduino UNO R4 WiFi Controlled Potentiometer Level Display
This circuit features an Arduino UNO R4 WiFi microcontroller connected to a TM1651 display module (referred to as 'YY') and a potentiometer. The Arduino controls the display via digital pins D2 and D3, which are connected to the DIO and CLK pins of the TM1651, respectively. The potentiometer's output is read by the Arduino's analog pin A0 and is used to adjust the display level on the TM1651, indicating a value that likely represents a battery level or similar variable input.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • IoT devices and smart home automation
  • Remote data logging and monitoring
  • Web-based control systems
  • Wireless sensor networks
  • Prototyping connected devices

Technical Specifications

The Arduino Yun features a combination of an ATmega32U4 microcontroller and an Atheros AR9331 processor running Linux. Below are the key technical details:

Key Technical Details

Specification Value
Microcontroller ATmega32U4
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 20 (7 PWM outputs)
Analog Input Pins 12
Flash Memory 32 KB (ATmega32U4)
SRAM 2.5 KB (ATmega32U4)
EEPROM 1 KB (ATmega32U4)
Clock Speed 16 MHz (ATmega32U4)
Linux Processor Atheros AR9331
Linux OS OpenWrt-based Linino
Wi-Fi IEEE 802.11b/g/n
Ethernet 10/100 Mbps
USB Type-A USB host
MicroSD Card Slot Yes

Pin Configuration and Descriptions

Pin Name Description
VIN Input voltage to the board when using an external power source (7-12V).
5V Regulated 5V output from the board.
GND Ground pins.
Digital Pins 0-13 General-purpose digital I/O pins.
PWM Pins Digital pins 3, 5, 6, 9, 10, 11 support PWM output.
Analog Pins A0-A11 Analog input pins (12-bit resolution).
ICSP Header Used for programming the ATmega32U4 microcontroller.
RX/TX Serial communication pins (0: RX, 1: TX).
USB Host Connect USB devices (e.g., keyboards, storage).
Ethernet Port Connect to wired networks.
MicroSD Slot Expand storage for Linux-based applications.

Usage Instructions

The Arduino Yun is versatile and can be used in a variety of projects. Below are the steps to get started and important considerations:

How to Use the Arduino Yun in a Circuit

  1. Power the Board:
    • Connect the Arduino Yun to your computer via a micro-USB cable or use an external power supply (7-12V) through the VIN pin or DC jack.
  2. Connect to Wi-Fi:
    • Open the Arduino IDE and navigate to the "Tools" menu. Select the correct board ("Arduino Yun") and port.
    • Access the Yun's web interface by connecting to its default Wi-Fi network and entering http://arduino.local in your browser.
    • Configure the Wi-Fi settings to connect the Yun to your local network.
  3. Upload Code:
    • Write your sketch in the Arduino IDE and upload it to the board. The ATmega32U4 microcontroller will execute the code.
  4. Use Linux Features:
    • Use the Linux processor for advanced tasks like running Python scripts, managing files, or hosting a web server.

Important Considerations and Best Practices

  • Power Supply: Ensure the input voltage does not exceed the recommended range (7-12V) to avoid damaging the board.
  • Wi-Fi Security: Use strong passwords and secure protocols when connecting the Yun to a network.
  • Linux Processor: The Atheros AR9331 processor can be accessed via SSH for advanced configurations.
  • MicroSD Card: Use a microSD card to expand storage for Linux-based applications.
  • Serial Communication: Use the Bridge library to enable communication between the ATmega32U4 and the Linux processor.

Example Code for Arduino Yun

Below is an example of how to use the Arduino Yun to read a temperature sensor and send the data to a web server:

#include <Bridge.h>
#include <HttpClient.h>

const int sensorPin = A0; // Analog pin connected to the temperature sensor

void setup() {
  Bridge.begin(); // Initialize the Bridge library
  Serial.begin(9600); // Start serial communication
  while (!Serial); // Wait for the serial monitor to open
  Serial.println("Arduino Yun Temperature Logger");
}

void loop() {
  int sensorValue = analogRead(sensorPin); // Read the sensor value
  float voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage
  float temperature = (voltage - 0.5) * 100.0; // Convert to temperature (Celsius)

  // Print temperature to the serial monitor
  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.println(" °C");

  // Send temperature data to a web server
  HttpClient client;
  client.begin("http://example.com/log"); // Replace with your server URL
  client.post("temperature=" + String(temperature));
  client.end();

  delay(5000); // Wait 5 seconds before the next reading
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. The board is not detected by the Arduino IDE:

    • Ensure the correct board and port are selected in the "Tools" menu.
    • Check the USB cable and connection. Use a data-capable USB cable.
    • Restart the Arduino IDE and reconnect the board.
  2. Wi-Fi connection fails:

    • Verify the Wi-Fi credentials entered in the web interface.
    • Ensure the router is within range and supports 2.4 GHz Wi-Fi (the Yun does not support 5 GHz).
  3. Linux processor is unresponsive:

    • Reset the Linux processor by holding the WLAN RST button for 5 seconds.
    • Ensure the microSD card is properly formatted and inserted if used.
  4. Sketch upload fails:

    • Check the USB connection and ensure no other program is using the serial port.
    • Press the reset button on the board and try uploading again.

FAQs

  • Can I use the Arduino Yun without Wi-Fi?
    Yes, the Yun can function as a standalone microcontroller without using its Wi-Fi capabilities.

  • What is the maximum storage capacity for the microSD card?
    The Arduino Yun supports microSD cards up to 32 GB.

  • How do I access the Linux terminal?
    Use an SSH client (e.g., PuTTY) to connect to the Yun's IP address. The default username is root, and the password is set during the initial configuration.

  • Can I run Python scripts on the Yun?
    Yes, the Linux processor supports Python. You can upload scripts via SSH or the web interface.

This documentation provides a comprehensive guide to using the Arduino Yun effectively. For further assistance, refer to the official Arduino website or community forums.