element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Enchanted Objects
  • Challenges & Projects
  • Design Challenges
  • Enchanted Objects
  • More
  • Cancel
Enchanted Objects
Blog MagicHat - 8 - Arduino Yun
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: amgalbu
  • Date Created: 16 Apr 2015 6:42 AM Date Created
  • Views 752 views
  • Likes 5 likes
  • Comments 5 comments
  • yun
  • enchanted_objects
  • magic_doctor_hat
  • arduino_yun
  • arduino
Related
Recommended

MagicHat - 8 - Arduino Yun

amgalbu
amgalbu
16 Apr 2015

I'm currently building the "hardware" of the hat, so before posting a complete update, let's talk a little about the mind of the hat...

 

One of the most common complaints of Arduinos is their lack of connectivity. You build these cool hardware hacks, but then you can’t make them apart of the Internet of Things (IoT) unless you plug in a bulky Arduino WiFi shield.

The Arduino Yun solves that problem. The Yun is an Arduino with WiFi built in. Additionally, the Yun has a second microprocessor that runs a lightweight version of Linux and comes with Python preinstalled. However you can install Ruby, Node or PHP...

 

Overview of Arduino Yun

The Yun’s primary components are:

  • Atmel ATmega32U4 – this is the “Arduino chip” that controls the pins and lets you do all the hardware hacking that you associate with Arduinos. When you send a sketch (Arduino code) to the Yun via the Arduino IDE, it’s running on this chip.
  • Atheros AR9331 – This is the “Linux and WiFi chip.” It runs OpenWRT, “a Linux distribution for embedded devices.”
  • Three ports: a standard USB, a micro USB, and an ethernet port
  • Three buttons: WiFi reset, “Arduino chip” reset, and “Linux chip” reset. You’ll use the WiFi reset most often.
  • A microSD slot for external storage

 

Note: If you hold down the Arduino’s WiFi reset button for more than 30 seconds, your Yun will reset to factory conditions! (Though, if you’ve upgraded OpenWRT, the new version will remain.) If you hold the WiFi button for more than 5 seconds but less than 30, it will reset the WiFi networking settings.

 

Upgrade OpenWRT-Yun

Your Yun ships with a lightweight version of Linux called OpenWRT-Yun. In the time that has passed since your Yun shipped off the factory line, a newer and better version of OpenWRT-Yun has been released.

You’re going to save yourself a lot of headache if you upgrade to the latest version of OpenWRT-Yun now. (If you want to know all the details of why, check out the OpenWRT release notes). This process will take less than ten minutes.

  1. Visit the Arduino Software page
  2. Scroll halfway down the page
  3. Click the link for the OpenWRT-Yun upgrade image

image

  1. Drag the zip file onto the root of the SD card (you do not need to extract it)
  2. Eject the SD card, remove it from your computer, and plug it into the Yun
  3. Now we’ve got an OpenWRT image lying in wait on our SD card. Let’s fire up the Yun.

 

Connect to the Ardunio Yun over Wifi

If you have not previously connected your Yun to WiFi, it will create its own WiFi hotspot. You’ll connect your computer directly to the Arudino’s WiFi, open up the control panel in a browser, configure the Yun to connect to the wireless network of your choosing, then meet it back on that network.

  • Plug the small end of the micro USB cable into your Yun and the other end into your computer
  • Wait about 60 seconds for the Yun to boot up. When the Yun’s ready to go, you’ll see the white USB LED turn on.
  • On your laptop, check the available WiFi Networks for a new one called something like: ARDUINO-YUN90XXXXXX.
  • Once you’ve connected to your Arduino’s WiFi, open a browser and visit arduino.local. If that doesn’t work, visit 192.168.240.1 (I’m not sure why, but I found the former to be flakey). When asked for a password, enter “arduino”

 

image

 

Connect your Arduino WiFi

Once your Arduino Yun reboots:

  • ensure you’re still connected to the Arduino YUN-09XXXX WiFi network
  • revisit arduino.local or 192.168.240.1
  • click the Configure Button in the top right. Here you can:
    Change the name of your Arduino Yun
    Change the password
    Connect your Arduino to a WiFi network.
  • Select your WiFi network from the dropdown and carefully enter your password. If you get the password wrong you will not get an error message. If your Arduino reboots but you still see its Arduino Yun-902XXXX as an available option, there’s a good chance you typed in the wrong WiFi password.

 

image

 

When all the settings are to your liking, click Configure and Restart. While you’re waiting, switch your laptop over to the WiFi network you just punched in to your Arduino Yun and wait for it to join you there.

 

Install the Arduino IDE

The last bit of setup is to install the Arduino IDE on our computer. This will let us write Arduino programs that will interact with the pins on the board so that we can do the kind of things that you associate with a traditional Arduino.

Make sure you have either Java 6 or Java 7 installed on your machine. If you don’t, download and install Java 7. (Java is currently at version 8, though the Arduino IDE seems to only support 6 or 7.)

Visit the Arduino software page and download the latest Arduino IDE.


This file is about 150 MB. After it downloads, install it, then open the Arduino IDE. Then we need to do two things to set up the IDE to work with your Yun:

First, click Tools -> Board and select Arduino Yun.

 

image


Second, click Tools -> Port and select the option with the IP address (it’s probably the last one).

From now on, you can build and download applications as on any other Arduino board!

  • Sign in to reply

Top Comments

  • Workshopshed
    Workshopshed over 10 years ago +1
    Yes, I also found that I had to connect via an IPAddress rather than name, it's helpful to see it in the ports menu, the Ethernet port and WiFi seem to have adjacent addresses. It's also VERY IMPORTANT…
  • Workshopshed
    Workshopshed over 10 years ago in reply to amgalbu +1
    It can brick the Yun, there is a way back out but it's a bit fiddly, voids the warenty and you have to set up a TFTP server.
  • Workshopshed
    Workshopshed over 10 years ago in reply to fvan

    WARNING

    Following this guide will VOID the WARRANTY of your Yún

     

    http://www.arduino.cc/en/Tutorial/YunUBootReflash

     

    "This procedure uses U-Boot, something similar to the BIOS on a PC. U-Boot is a very small program executed right after you power on a Yún. With U-Boot you can restore a Yún to its factory settings. To reflash the Yún from the U-Boot prompt, you will download 3 different image files and write their contents on the flash memory of the Yún, erasing all previously stored information. It's a bit like formatting a computer's hard drive.  This should be considered an advanced topic, pay heed to the warnings throughout. These notes are for reference only."

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fvan
    fvan over 10 years ago in reply to Workshopshed

    Wow, is the recovery procedure so intrusive that it would void the warranty ??

     

    Accidents happen, people should not be "punished" for trying to fix them :s

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 10 years ago in reply to amgalbu

    It can brick the Yun, there is a way back out but it's a bit fiddly, voids the warenty and you have to set up a TFTP server.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • amgalbu
    amgalbu over 10 years ago in reply to Workshopshed

    Hi Andy

    Yes, it's very important not to remove power!! Never tried (and I don't wanna try) to see what happens when ypu switch the board off while it is flashing! Probably that's a note it worths adding to the post

     

    cheers

    Ambrogio

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 10 years ago

    Yes, I also found that I had to connect via an IPAddress rather than name, it's helpful to see it in the ports menu, the Ethernet port and WiFi seem to have adjacent addresses.

     

    It's also VERY IMPORTANT not to remove the power before the flashing process completes.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube