Arduino Yun Manual Download Page 14

 

You can now join the network you assigned to the Yún.  

Programming the 32U4 over WiFi 

When your Yún is on the same network as your computer, you can connect to it wirelessly to 
program it.  

After configuring your Yún, connect to the network you specified in the configuration settings. 
Open the Arduino IDE.  

Under the 

Tools > Port

 menu, you should see an entry that lists your Yún's name and its IP 

address. Under the 

Board

 menu, select Arduino Yún.  

Open the Blink example (

File > Examples > 01Basics > Blink

) and upload the sketch to the 

board. You will be prompted for the administrator password. Use the one you entered in the 
configuration 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 with an ethernet cable, it will try to connect 
automatically via DHCP. The board will show up on the ports menu just as it would over WiFi.  

If you want to connect the Yun directly to your computer, either configure the computer's 
interfaces to have a static IP address, or act as a DHCP server.  

NB: the ethernet interface is eth1, not eth0

  

Communicating with Linino via Bridge 

The Bridge library enables communication between Arduino and Linino. There are several 
different utility classes that facilitate different kinds of communication between the two, 
described below, and more in depth on the 

Bridge library reference

 pages.  

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: