Difference between revisions of "Arduino Yun"

From Earlham CS Department
Jump to navigation Jump to search
(Crash Course)
m (Temboo)
 
(17 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
=Crash Course=
 
=Crash Course=
*if you don't know the Yun password ask someone that would know in person
+
*if you don't know the yun password ask someone that would know in person
 +
**all of the cs yuns use the same password
 
*getting started http://arduino.cc/en/Guide/ArduinoYun
 
*getting started http://arduino.cc/en/Guide/ArduinoYun
 
*Arduino IDE 1.5.8 BETA must be used, get it here: http://arduino.cc/en/Main/Software
 
*Arduino IDE 1.5.8 BETA must be used, get it here: http://arduino.cc/en/Main/Software
Line 11: Line 12:
 
*has Python 2.7
 
*has Python 2.7
 
*advised that C++ be cross-compiled
 
*advised that C++ be cross-compiled
 +
** GCC exists in version 1.5+
 
*the "Bridge" library creates a bridge between Arduino and Linux
 
*the "Bridge" library creates a bridge between Arduino and Linux
 
**read this for more information: http://arduino.cc/en/Reference/YunBridgeLibrary
 
**read this for more information: http://arduino.cc/en/Reference/YunBridgeLibrary
 
**or this for an example: http://arduino.cc/en/Tutorial/Bridge
 
**or this for an example: http://arduino.cc/en/Tutorial/Bridge
 
+
* [http://arduino.cc/en/Tutorial/TemperatureWebPanel example] Web pages can be added to /www/ and accessed normally
 +
* [http://arduino.cc/en/Guide/ArduinoYun#toc5 source] REST has a built-in interface for pins under /data
 +
* [http://forum.arduino.cc/index.php?topic=188101.msg1593444#msg1593444 source] Pins 21, 22, and 23 can be accessed in /sys/class/gpio/ (in linux)
 +
* [https://github.com/arduino/YunWebUI example] LuCI web interface can be hacked somehow (magic?)
  
 
each Yun
 
each Yun
Line 23: Line 28:
  
 
=Resources=
 
=Resources=
[[http://arduino.cc/en/Main/ArduinoBoardYun?from=Products.ArduinoYUN product page]]
+
[http://arduino.cc/en/Main/ArduinoBoardYun?from=Products.ArduinoYUN product page]
  
[[http://arduino.cc/en/Guide/ArduinoYun getting started]]
+
[http://arduino.cc/en/Guide/ArduinoYun getting started]
  
 
need sorting ->
 
need sorting ->
 
* http://arduino.cc/en/Tutorial/YunDatalogger
 
* http://arduino.cc/en/Tutorial/YunDatalogger
 
* https://www.temboo.com/arduino/yun/
 
* https://www.temboo.com/arduino/yun/
 
  
 
=Current Yuns=
 
=Current Yuns=
 
csyun1
 
csyun1
 
*registered
 
*registered
*not configured
+
*configured
 
*90A2DAF510F8
 
*90A2DAF510F8
 
*ec2011
 
*ec2011
 
*159.28.130.243
 
*159.28.130.243
 
*owner: charliep
 
*owner: charliep
 +
*OpenWRT v1.0
  
  
Line 49: Line 54:
 
*159.28.130.242
 
*159.28.130.242
 
*owner: charliep
 
*owner: charliep
 +
*OpenWRT v1.0
  
  
Line 58: Line 64:
 
*159.28.130.191
 
*159.28.130.191
 
*owner: charliep
 
*owner: charliep
 +
*OpenWRT v1.0
  
  
 
csyun4
 
csyun4
 +
*ARC yun
 
*registered
 
*registered
 
*configured
 
*configured
Line 67: Line 75:
 
*159.28.130.63
 
*159.28.130.63
 
*owner: charliep
 
*owner: charliep
 +
*OpenWRT v1.0
  
  
Line 76: Line 85:
 
*159.28.131.13
 
*159.28.131.13
 
*owner: charliep
 
*owner: charliep
 +
*OpenWRT v1.0
  
  
Line 85: Line 95:
 
*159.28.131.16
 
*159.28.131.16
 
*owner: charliep
 
*owner: charliep
 +
*OpenWRT v1.0
  
  
 
csyun7
 
csyun7
*not registered
+
*ARC yun
*not configured
+
*registered
*with Andrey
+
*configured
 +
*90A2DAF30459
 +
*
 +
*159.28.131.46
 +
*owner: charliep
 +
*OpenWRT v1.0
  
 
=Details=
 
=Details=
Line 99: Line 115:
 
Comes preinstalled with
 
Comes preinstalled with
 
* python 2.7
 
* python 2.7
 +
* node.js
 
* vim / nano
 
* vim / nano
 
  
 
==Boot==
 
==Boot==
 
*The Arduino side boots up almost instantaneously.
 
*The Arduino side boots up almost instantaneously.
*However, the Linux side takes about as long as a PC to boot up.
+
*However, the Linux side takes about as long as a normal PC to boot up.
*The white light indicates that the wifi is working among other things.
+
*The white light seems to indicate that the wifi is working as well as other things.
 
 
  
 
==Sketch Upload==
 
==Sketch Upload==
*You can't upload sketches through wifi on ECWireless. It works on normal LANs. What's the cause of this?
+
*You can't upload sketches through wifi on ECWireless. It works on normal LANs. (Why?)
*It seems normal for the USB to lose connection and to immediately reestablish connection. Sometimes the COM port will change after the first sketch upload. If the connection is not reestablished (why?) you can use the "USB stops being recognized" bit below.
+
*It's normal for the USB to lose connection and to immediately reestablish connection. The Arduino programmable USB seems to be piggybacking on linux as a virtual COM port.
 +
**Sometimes the recognized COM port will change after the first sketch upload. It seems this is due to the linux side swapping to the correct Arduino COM port.
 +
**If the connection is not reestablished (why?) you can use the "USB stops being recognized" bit below.
  
 
==Serial==
 
==Serial==
Line 122: Line 139:
  
 
==Network==
 
==Network==
I had trouble getting it on ECWireless. I had to go to ITS and have them register it manually. I configured the Yun to connect to ECWireless and then was able to ssh to it directly. However, I could not upload sketches via wireless.
+
I had trouble getting it on ECWireless.
 
+
*I went to go to ITS and had them register the Yuns manually. ITS has registered our Yuns' as "college owned" so that they don't require authentication.
In addition each time it is rebooted it loses access to wifi. There's a quick solution to that: tapping the 32U4 RST button twice to restart the 32U4 processor and restart the sketch. [[http://arduino.cc/en/Guide/ArduinoYun#toc6 described here]]
+
*In the Yun web configuration panel I set them to connect to ECWireless and then was able to ssh to them directly.
 
+
*However, I could not upload sketches via wifi. This is due to the configuration of ECWireless.
It would be possible to use guest wireless if the Yun told us its IP (due to non-static IP addresses on guest wireless.) It could do that by ssh'ing to a server (using keys) and saving its ifconfig.
 
 
 
It's also possible to bypass ECWireless authentication by having ITS configure the device to have greater permissions.
 
  
 +
It's possible to get a Yun's IP by uploading a ShellCommand sketch and running the "ifconfig" command.
 +
*very useful when on a non-static IP network
 +
*For example, this could be used to get a Yun's IP address when it's on Guest Wireless.
  
 
==USB stops being recognized==
 
==USB stops being recognized==
This fixed my problem: [[http://forum.arduino.cc/index.php?PHPSESSID=ap760n6qcp611t7aul8mdve6s3&topic=188101.msg1593444#msg1593444 arduino form]]
+
This fixed my problem: [http://forum.arduino.cc/index.php?PHPSESSID=ap760n6qcp611t7aul8mdve6s3&topic=188101.msg1593444#msg1593444 arduino form]
  
 
#nano /usr/bin/run-avrdude
 
#nano /usr/bin/run-avrdude
Line 139: Line 156:
  
 
=Temboo=
 
=Temboo=
[[http://arduino.cc/en/Guide/ArduinoYun#toc20 Arduino Description of Temboo]]
+
[http://arduino.cc/en/Guide/ArduinoYun#toc20 Arduino Description of Temboo]
  
[[https://temboo.com/arduino/yun/ Temboo Getting Started]]
+
[https://temboo.com/arduino/yun/ Temboo Getting Started]

Latest revision as of 07:49, 2 June 2015

Arduino Yun

Crash Course

each Yun

  • is numbered
  • has a designated box
  • has a label on it with its number and the last two octets of its IP address (I.E. cs4 130.63 is csyun4 with the IP 159.28.130.63)
    • 159.28 is Earlham's IP address

Resources

product page

getting started

need sorting ->

Current Yuns

csyun1

  • registered
  • configured
  • 90A2DAF510F8
  • ec2011
  • 159.28.130.243
  • owner: charliep
  • OpenWRT v1.0


csyun2

  • registered? (no internet access)
  • configured?
  • 90A2DAF30034
  • ec2009
  • 159.28.130.242
  • owner: charliep
  • OpenWRT v1.0


csyun3

  • registered
  • configured
  • 90A2DAF210E7
  • ec2012
  • 159.28.130.191
  • owner: charliep
  • OpenWRT v1.0


csyun4

  • ARC yun
  • registered
  • configured
  • 90A2DAF031AC
  • ec2016
  • 159.28.130.63
  • owner: charliep
  • OpenWRT v1.0


csyun5

  • registered
  • configured
  • 90A2DAF9035F
  • ec2017
  • 159.28.131.13
  • owner: charliep
  • OpenWRT v1.0


csyun6

  • registered
  • configured
  • 90A2DAF51147
  • ec2024
  • 159.28.131.16
  • owner: charliep
  • OpenWRT v1.0


csyun7

  • ARC yun
  • registered
  • configured
  • 90A2DAF30459
  • 159.28.131.46
  • owner: charliep
  • OpenWRT v1.0

Details

Package Manager

Uses a package manager called opkg. Very similar to apt-get and yum. Has a healthy selection of software.

Comes preinstalled with

  • python 2.7
  • node.js
  • vim / nano

Boot

  • The Arduino side boots up almost instantaneously.
  • However, the Linux side takes about as long as a normal PC to boot up.
  • The white light seems to indicate that the wifi is working as well as other things.

Sketch Upload

  • You can't upload sketches through wifi on ECWireless. It works on normal LANs. (Why?)
  • It's normal for the USB to lose connection and to immediately reestablish connection. The Arduino programmable USB seems to be piggybacking on linux as a virtual COM port.
    • Sometimes the recognized COM port will change after the first sketch upload. It seems this is due to the linux side swapping to the correct Arduino COM port.
    • If the connection is not reestablished (why?) you can use the "USB stops being recognized" bit below.

Serial

  • Serial talks via the Arduino serial monitor
  • Bridge establishes communication between Arduino and Linux processors
  • Console uses bridge to establish a console (similar to serial) that can be accessed with telent from the Yun's local terminal


troubleshooting

Network

I had trouble getting it on ECWireless.

  • I went to go to ITS and had them register the Yuns manually. ITS has registered our Yuns' as "college owned" so that they don't require authentication.
  • In the Yun web configuration panel I set them to connect to ECWireless and then was able to ssh to them directly.
  • However, I could not upload sketches via wifi. This is due to the configuration of ECWireless.

It's possible to get a Yun's IP by uploading a ShellCommand sketch and running the "ifconfig" command.

  • very useful when on a non-static IP network
  • For example, this could be used to get a Yun's IP address when it's on Guest Wireless.

USB stops being recognized

This fixed my problem: arduino form

  1. nano /usr/bin/run-avrdude
  2. Change the efuse value from FB to CB
  3. execute "/usr/bin/run-avrdude /etc/arduino/Caterina-Yun.hex"

Temboo

Arduino Description of Temboo

Temboo Getting Started