Tangible Computing
23. Installation Instructions


The arduino environment comes in flavours for MS Windows, Mac OSX, and Ubuntu Linux. We have packaged together a portable OSX/Linux environment that contains the Arduino IDE, the command line tool chain, and our UA custom libraries. It installs onto OSX and 32/64 bit linux operating systems.

We have not mastered the Windows world, but some of the students have successfully used Visual Studio, and installed the tool chain under the Cygwin linux-like environment for Windows (http://www.cygwin.com/). We will add their install instructions eventually here. But we do have a install of the IDE that contains the more recent avr-libc-1.7.1 library, and our custom library.

IMPORTANT: The toolchain does not play well with pathnames that have spaces in them. This is because, in the command line world, spaces are used to separate words, just like in written text like this. So if you have spaces in an identifier (like a file name) you need to enclose the name in quotes "like this", or to escape the space: like\  this.

So to avoid grief when using the toolchain, make sure the arduino environment is stored in a location with no blanks in the path, and that your location where you work on code has blank-free paths.

23.1 Ubuntu Virtual Machine

Perhaps the best way to use the environment if you do not have an Ubuntu machine is to use the Ubuntu linux virtual machine that we have prepared. It contains the complete environment with all the required installed software, ready to go. A virtual machine is a complete install of an operating system and applications, except that is is not on actual hardware. It is instead a collection of files that are used to simulate the actual hardware using a simulation program, such as vmware or parallels.

So to use the virtual machine you need to obtain the appropriate application for your host operating system. The complete ubuntu 32-bit vm that you can run under vmware is here
UbuntuUA.vmwarevm-2012-10-27.zip
It is big (approx 4G bytes), so don't download it unless you need to, it is faster to copy it to a memory stick in the lab. It contains tool chain version 2.2.1 and is ready to go.

The vm has one login id, called cmput296, with a password of cmput296. Remote logins to this vm are disable, so it should be relatively safe to use. You should change the password to something more secure.

NOTE: If when you start the VM you get a 'login' prompt, instead of the full screen login, then the <CTL>-<ALT>-F7 key sequence will get you the login screen.

Once you have a VM running, you can install updates to the toolchain as you would in a normal ubuntu install.

IMPORTANT: When you work on a virtual machine, your files are stored on the virtual disk unless you put them in directories that are shared with your host machine (the one running vmware or parallels). Make sure you keep copies of your work. The best way is to use git and a remote repository.

23.2 Ubuntu Linux



Ubuntu Toolchain

23.3 OSX



23.4 Windows XP and 7

If you are the usual user of Windows, where you have administrator rights on your machine, then installing the Arduino software and drivers is relatively simple. If you only use one or two arduino boards, you can ignore the following.

But for lab environments, where there are many users, Ardino boards, and workstations some preparation is required to make your life simple. Normally each Arduino generates its own unique COM port. The Arduino USB is identified by the vendor ID (2341), product ID (0001 for the UNO, 0010 for Mega 2560), and the unique serial number. This combination generates a unique COM port number. What this means is that unless you do something special, every new board you plug in to a new workstation is going to require a driver install. This is unworkable for users without admin privileges.

Fortunately the device driver can be configured to ignore the device serial number. In that case, you will only get as many devices drivers to install as you have USB ports times board types.

For the purpose of the examples below, we assume that you have stored the Arduino environment in C:\arduino-ua. It does not have to be there.

The process consists of the following steps,

  1. If you have not yet installed the Arduino drivers, this step is not necessary. If you have, you have to first uninstall any existing driver. This consists of the following steps:

    1. Make sure all the Arduino boards are unplugged from the USB ports.

    2. select
      Control Panel / System / Advanced / Environment
      set the System environment variable
      DevMgr_Show_NonPresent_Devices to 1
      If it is not present, add it. Do OK and return back to the system properties window. Select OK to close the control panel.

    3. select
      Control Panel / System / Hardware / Device Manager
      and then select
      View / Show hidden devices
      Then plug in an Arduino board. At this point the device manager should refresh and you will see one or more entries under Ports. You will also get a driver install dialog appearing. Cancel and close that dialog first.

    4. uninstall any Arduino drivers in Ports, along with the one called USB Device which corresponds to the board you just plugged in.

    5. at this point all previous Arduino drivers should be gone. Leave device manager running so you can see further driver installs.

  2. Add a new registry key to control the Arduino driver.

    1. Start regedit by doing Start / Run, and enter regedit into the program box.

    2. Add a new binary registry key
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags\IgnoreHWSerNum23410010 with value 01
      this applies to Arduio Mega 2560. Use IgnoreHWSerNum23410001 for Uno boards.

    3. Carefully check that this is what you added and then close regedit.

  3. Plug in an Arduino board to your "first" USB port. This will initiate a driver install dialog. Select that option that you don't want to connect but have a specific location that you want to look for the driver. Then tell XP that your driver is located in C:\arduino-ua\drivers, or wherever they are located. Confirm that you want to install and complete the installation.

  4. Repeat the procedure for your "second" and other USB ports.

  5. At this point each USB port will have a unique COM port number associated with any Mega board plugged into that port. Any Mega board, regardless of serial number should be recognized without having to do a further install.
NOTE: This should work for the FTDI interface, which has vendor ID 0403 and Product ID 6001, for a registry key name of
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags\IgnoreHWSerNum04036001

23. Installation Instructions
Tangible Computing / Version 3.20 2013-03-25