Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

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

Image of Arduino YunDesign with Arduino Yun in Cirkit Designer

Introduction

The Arduino Yún is a powerful microcontroller board that combines the features of the classic Arduino with the capabilities of a Linux system. Based on the ATmega32U4 microcontroller and the Atheros AR9331 processor, the Yún is designed to support Internet of Things (IoT) projects by providing both Wi-Fi connectivity and Ethernet port. It is an ideal choice for projects that require communication with web services, handling of complex data, or integration with sensors and actuators.

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 ATmega328P-Based Sensor Hub with OLED Display and LIDAR: 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.

Open Project in Cirkit Designer
Image of Arduino UNO and ESP32 CAM Controlled Fire Detection and Alert System with GSM Notification: 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.

Open Project in Cirkit Designer
Image of Arduino UNO R4 WiFi Controlled Potentiometer Level Display: 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.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Function Description
1-14 Digital Pins Used for digital input/output. PWM available on pins 3, 5, 6, 9, 10, 11, and 13.
A0-A5 Analog Inputs Used for analog input. Can also function as digital I/O.
RST Reset Resets the ATmega32U4 microcontroller.
3V3 3.3V Supply Provides a 3.3V supply from the AR9331 processor.
5V 5V Supply Provides a 5V supply to the board.
GND Ground Common ground for circuits.
RX0, TX1 Serial Comm Serial communication pins.
ICSP In-Circuit Serial Programming Used for programming the ATmega32U4.

Usage Instructions

Integrating Arduino Yún into a Circuit

  1. Powering the Arduino Yún:

    • Use a micro USB cable to connect the Yún to a 5V USB power source.
    • Alternatively, power the Yún through the Ethernet port using a PoE adapter.
  2. Programming the Arduino Yún:

    • Connect the Yún to a computer using a micro USB cable.
    • Select the appropriate board and port in the Arduino IDE.
    • Upload your sketch to the ATmega32U4 microcontroller.
  3. Connecting to a Network:

    • Use the onboard Wi-Fi module to connect the Yún to a wireless network.
    • Configure network settings through the Arduino Yún's web panel.
  4. Interfacing with Sensors and Actuators:

    • Connect sensors to the analog pins for reading environmental data.
    • Use digital I/O pins to control actuators like motors, LEDs, or relays.

Important Considerations and Best Practices

Troubleshooting and FAQs

Common Issues

Solutions and Tips for Troubleshooting

Example Code for Arduino Yún

Here's a simple example of how to blink an LED connected to pin 13 on the Arduino Yún:

// Define the LED pin
const int ledPin = 13;

void setup() {
  // Initialize the LED pin as an output
  pinMode(ledPin, OUTPUT);
}

void loop() {
  // Turn the LED on
  digitalWrite(ledPin, HIGH);
  // Wait for one second
  delay(1000);
  // Turn the LED off
  digitalWrite(ledPin, LOW);
  // Wait for one second
  delay(1000);
}

Remember to select the correct board and port in the Arduino IDE before uploading this sketch to the Arduino Yún.

For more advanced usage involving the Linux processor and networking capabilities, refer to the Arduino Yún's extensive documentation and examples provided by the Arduino community.