background image

Guide to the Arduino Yún 

The Arduino Yún is an Arduino board unlike any other. While programming it is very similar to 
the Arduino Leonardo and uses the same processor, the Atmel ATmega32U4, it also has an 
additional processor, an Atheros AR9331, running Linux and the OpenWrt wireless stack. 
Programming the 32U4 via USB is identical to the 

Arduino Leonardo

. Once you've configured 

the Yún to connect to your WiFi network, you can program the 32U4 via WiFi as well.  

To connect the Arduino Yún to your computer, you'll need a Micro-B USB cable. This USB 
cable provides power and data to the board. When programming the Yún, you must choose 

Arduino Yún

 from the 

Tools > Board

 menu in the Arduino IDE. 

The Yún is only supported 

by Arduino IDE 1.5.4 and later.

  

 

Differences from the Arduino Leonardo

 

 

Linino

 

 

Python

 

 

External storage on the Yún

 

 

Web services

 

 

Resetting the processors (AR9331, WiFi, and 32U4)

 

 

Serial re-enumeration on reset.

 

 

No reset when you open the serial port.

 

 

Installing Drivers for the Yún

 

o

 

OSX

 

o

 

Windows 

 

o

 

Linux 

 

 

Configuring the onboard WiFi

 

 

Programming the 32U4 over WiFi

 

 

Using the onboard Ethernet

 

 

Communicating with Linino via Bridge

 

 

The Console

 

 

Process

 

 

Using Bridge to pass information between processors

 

 

Connecting to internet services with Temboo

 

 

Spacebrew

 

 

Install additional software on Linux

 

 

Next Steps

 

Differences from the Arduino Leonardo 

Summary of Contents for Yun

Page 1: ...ta to the board When programming the Y n you must choose Arduino Y n from the Tools Board menu in the Arduino IDE The Y n is only supported by Arduino IDE 1 5 4 and later Differences from the Arduino...

Page 2: ...you power your Y n with more than 5V you will likely damage it If you are not powering the Y n from the micro USB connection you can apply power to the Vin and 5V pins on the board It is recommended t...

Page 3: ...There are several status LEDs on the Y n indicating power WLAN connection WAN connection and USB Additionally pin 13 is connected to one of the status lights Linino...

Page 4: ...ons or scripts For more on Python visit the Python 2 7 documentation pages If you re getting started with Python for the first time there are a number of excellent resources on line Learn Python the H...

Page 5: ...by pressing the Wifi reset button for longer longer than 5 seconds but less than 30 the AR9331 processor will reboot The WiFi configuration will be reset and the Y n will start its own wiFi network Ar...

Page 6: ...This means that if you re using any Serial or Console print println or write statements in setup they won t show up when you open the serial monitor or Console connection To work around this you can c...

Page 7: ...nloa Once yo comes with ad Arduino u ve read th an installer IDE 1 5 4 i he license a r for the IDE installer or l and if you ag E and driver later and do gree with it rs ouble click click the the ins...

Page 8: ...By default all available components are selected These include the IDE drivers and shortcuts Select the location you wish to install the IDE...

Page 9: ...The installer will display its progress as it extracts the files to the proper locations if you chose to install the drivers a pop up window will confirm your selection...

Page 10: ...ng blocked by a firewall Configuring the onboard WiFi The Y n has the ability to act as an Access Point but it can also connect to an existing network These instructions walk you through connecting yo...

Page 11: ...will find a page with some diagnostic information about the current network connections The first is your WiFi interface the second is your ethernet connection Press the Configuration button to proce...

Page 12: ...of 8 or more characters for your Arduino If you leave this field blank the system retains the default password of arduino If you wish you can set the timezone and country It is recommended to set thes...

Page 13: ...When you press the Configure Restart button the Arduino will reset itself and join the specified network The Arduino network will shut down after a few moments...

Page 14: ...ation screen Once the program is uploaded the 32U4 processor will restart You should see the LED connected to pin 13 blinking Using the onboard Ethernet When you connect the Yun to a wired network wit...

Page 15: ...wirelessly It creates a secure connection between the Y n and your computer via SSH Load the following onto your Y n include Console h const int ledPin 13 the pin that the LED is attached to int incom...

Page 16: ...see the Console by opening a terminal window and typing ssh root yourYunsName local telnet localhost 6571 then pressing enter NB If you are using Windows you must install a terminal emulator PuTTY is...

Page 17: ...the board through REST calls It demonstrates how you can create your own API when using REST style calls through the browser When running this example make sure your computer is on the same network a...

Page 18: ...or for parsing and controlling the pins This happens on port 5555 Start the server with server begin server listenOnLocalhost server begin Get Code In loop you ll create an instance of the YunClient f...

Page 19: ...following This value will assign a value to the pin turning it HIGH or LOW If there is no trailing read the value from the specified pin pin client parseInt if client read value client parseInt digit...

Page 20: ...D client print pin client print F set to analog client println value String key D key pin Bridge put key String value else value analogRead pin client print F Pin A client print pin client print F re...

Page 21: ...ode client readStringUntil r if mode input pinMode pin INPUT Send feedback to client client print F Pin D client print pin client print F configured as INPUT return if mode output pinMode pin OUTPUT S...

Page 22: ...r model and uses WebSockets to communicate between the two It runs a custom webserver on the Y n in python that allows for easy communication There are a number of examples for Spacebrew on the Y n in...

Reviews: