This page (revision-14) was last changed on 2020-06-05 22:04 by Murray Altheim

This page was created on 2020-05-24 01:48 by Murray Altheim

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
14 2020-06-05 22:04 7 KB Murray Altheim to previous
13 2020-05-24 11:46 7 KB Murray Altheim to previous | to last
12 2020-05-24 11:44 7 KB Murray Altheim to previous | to last
11 2020-05-24 11:44 7 KB Murray Altheim to previous | to last
10 2020-05-24 10:58 7 KB Murray Altheim to previous | to last
9 2020-05-24 05:04 6 KB Murray Altheim to previous | to last
8 2020-05-24 03:52 6 KB Murray Altheim to previous | to last
7 2020-05-24 03:22 6 KB Murray Altheim to previous | to last
6 2020-05-24 02:48 6 KB Murray Altheim to previous | to last
5 2020-05-24 02:34 5 KB Murray Altheim to previous | to last
4 2020-05-24 02:28 5 KB Murray Altheim to previous | to last
3 2020-05-24 02:19 4 KB Murray Altheim to previous | to last
2 2020-05-24 02:15 4 KB Murray Altheim to previous | to last
1 2020-05-24 01:48 2 KB Murray Altheim to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 changed 3 lines
%%(text-align:center)
[{Image src='attach/Arduino/arduino-yun-rev-2.2.jpg' width='400' caption='Arduino Yún'}]
%%
[{Image src='attach/Arduino/arduino-yun-rev-2.2.jpg' width='250' caption='Arduino Yún'}]
At line 5 changed one line
The __[Arduino Yún|ArduinoYún]__ (''Yún'' which means "cloud" in Mandarin) is unusual in that it combines what is effectively a 16MHz [Arduino Leonardo|https://store.arduino.cc/usa/leonardo] microcontroller with an [Atheros AR9331|https://www.openhacks.com/uploadsproductos/ar9331_datasheet.pdf], a 400MHz microprocessor running OpenWrt (a version of [Linux|https://en.wikipedia.org/wiki/Linux]), so it's a bit like a combination of an [Arduino] and a [Raspberry Pi] on one board the size of the Arduino Uno.
The __[Arduino Yún|ArduinoYún]__ is unusual in that it combines what is effectively a 16MHz [Arduino] Leonardo microcontroller with an [Atheros AR9331|https://www.openhacks.com/uploadsproductos/ar9331_datasheet.pdf], a 400MHz microprocessor running OpenWrt (a version of [Linux]), so it's a bit like a combination of an Arduino and a [Raspberry Pi] on one board.
At line 7 changed one line
I was [interested in [connecting the Yun to a motor shield or a Zumo|ArduinoYúnInterfacing], so I contacted Adafruit, Arduino.cc and Pololu, the latter makes the Zumo to get some help.
Here's some miscellaneous notes regarding the Yún (which means "''cloud''" in Mandarin).
At line 9 changed one line
Here's some miscellaneous notes regarding the Yún.
!! Notes
At line 11 removed 4 lines
!! OS Installation Notes
Despite being a 400MHz processor and being connected directly via an ethernet cable, it is good to remember that the AR9331 on the Yún is still quite a small computer. It's not as fast as a Raspberry Pi (a Pi 3 B+ runs at 1.1GHz) and you can run out of memory (and need to reboot) sometimes.
At line 34 changed one line
You use the {{opkg}} page manager rather than {{apt}} on Debian systems. The package names on OpenWrt are slightly different than Debian or other Linux flavours, so you might have to use {{opkg find name}} to find a software package (or look on the OpenWrt website for clues). You can install either python3 (the full package) or python3-light, which aims to provide most of what people need, and then just install the python3 subpackages as necessary. On a computer as small as a Yún you generally want to save as much space as possible. It wasn't an issue for me because I expanded the Yún's native drive space with a 32GB SD card (this is highly recommended, link below).
The Yún comes with Python 2 but I want to use Python 3, so I'll be installing vim, tcsh, Python3, and pip3. The package names on OpenWrt are slightly different than Debian or other Linux flavours, so you might have to use {{opkg find name}} to find a software package (or look on the OpenWrt website for clues). You can install either python3 (the full package) or python3-light, which aims to provide most of what people need, and then just install the python3 subpackages as necessary. On a computer as small as a Yún you generally want to save as much space as possible. It wasn't an issue for me because I expanded the Yún's native drive space with a 32GB SD card (this is highly recommended, link below).
At line 39 changed 2 lines
# opkg install tcsh blkid vim-full vim-runtime
# opkg install python3-light
# opkg install vim-full
# opkg install python3
At line 44 removed 73 lines
The {{tcsh}} is just a personal preference, rather than using the native bash shell. With the customised prompt (below) I get a nice colorful prompt. And yes, it's possible to do this with bash, but tcsh has a lot of nice features that I'm accustomed to. The {{blkid}} was used for setting up a swap memory space but is otherwise unnecessary. {{vim-full}} replaces the very-minimal version of the {{vi}} editor already included.
The Yún comes with Python 2 but I want to use Python 3, so I installed Python3 and the python package installer program {{pip3}}. The {{python3}} package installs the entirety of Python 3, so it seems {{python3-light}} is meant to generally suffice for most people. Based on the difference in install times, it's ''significantly'' smaller. Install pip3, upgrading the setuptools, smbus2 (for I²C support), etc.:
{{{
# pip3 install --upgrade setuptools
# pip3 install smbus2
# pip3 install python3-yaml
}}}
When installing {{git}} you'll also need {{ca-bundle}} in order to be able to handle {{https:}} URLs.
{{{
# opkg install ca-bundle git git-http
}}}
After that you should be able to perform a {{git clone}} successfully.
! Important
* One thing to note is that you **must** do an {{opkg update}} prior to installing any software because the package lists are hardwired into the Yún's firmware, so until you do the update it won't know about any additional packages. For example, after a reboot {{opkg find tcsh}} will return an empty line, but after the update it will find the package as normal.
* If you're going to expand the filesystem onto an SD card, do that before you install any software, as the process requires most of the available disk space to execute the expansion sketch. Once expanded you'll have plenty of space.
* When expanding the filesystem you'll be asked the size of the data partition in MB. This is the size of the partition used for the OS, with the rest of the SD card used for your applications and data. I used a 32MB SD card so I set the data partition to 1000 (1GB) leaving about 30GB of space for my workspace. Once you've done the partitioning the expansion sketch will run again, asking you to proceed. Unless you like getting into infinite loops just say "no".
!! Tcsh changes
I have a personal preference for {{tcsh}}. Once installed I include these three files in the home directory ({{/root}}) for configuration:
! .cshrc
{{{
#!/bin/tcsh
set path = ( \
. \
~/bin \
/usr/sbin \
/usr/bin \
/sbin \
/bin )
if ( -f ~/.aliases ) source ~/.aliases
if ( -f ~/.prompt ) source ~/.prompt
umask 022
}}}
! .aliases
{{{
alias ls '/bin/ls --color=auto'
alias lsa 'ls -alF'
alias h 'history'
alias c 'clear'
alias u 'cd ..'
alias uu 'cd ..;cd ..'
alias uuu 'cd ..;cd ..;cd ..'
alias uuuu 'cd ..;cd ..;cd ..;cd ..'
alias uuuuu 'cd ..;cd ..;cd ..;cd ..;cd ..'
alias pud 'pushd'
alias pod 'popd'
alias rsrc 'source /root/.cshrc'
}}}
! .prompt
{{{
#!/bin/tcsh
if ( $?tcsh ) then
# tcsh-specific commands:
set prompt="\
%{\033[3;32m%}[\!]%B %m: %b %{\033[35m%} %/%}\
%{\033[0;37m%}...%{\033[0m%} "
endif
}}}
At line 119 removed 2 lines
* [Getting Started with the Arduino Yún Rev. 2|https://www.arduino.cc/en/Guide/ArduinoYunRev2]
* [Let’s explore Arduino Yún’s unique features – Hardware review|https://blog.arduino.cc/2013/09/02/arduino-yun-hardware-review/?queryID=791d30c2178f319fa292d305ca578a8e]
At line 123 removed 5 lines
* [Re: Shuttoff or shutdown|https://forum.arduino.cc/index.php?topic=196590.msg4614580#msg4614580]
* [Running out of memory on yun rev 2 while trying to install sdk|https://github.com/aws/aws-iot-device-sdk-arduino-yun/issues/72] tells how to "increase available memory" by adding swap space
* [OpenWrt Project|https://openwrt.org/] home page
** [Documentation|https://openwrt.org/docs/start]
** [Technical Reference|https://openwrt.org/docs/techref/start]