CSC231 Customizing Ubuntu LiveCD to connect to Arduino stamp

From dftwiki3
Revision as of 13:53, 31 October 2008 by Thiebaut (talk | contribs) (New page: --~~~~ ====Process==== The process is fairly simple: # get the '''ISO''' of the current Ubuntu liveCD [https://help.ubuntu.com/community/LiveCD] # Follow the '''directions''' from the ve...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

--D. Thiebaut 18:53, 31 October 2008 (UTC)

Process

The process is fairly simple:

  1. get the ISO of the current Ubuntu liveCD [1]
  2. Follow the directions from the very nice customization page here
    1. Boot with the liveCD
    2. copy the liveCD to a new directory on a hard disk with enough free space (~ 5-10 GB)
    3. unpack liveCD
    4. chroot to the unpacked version
  3. add sun-java5-jre (this takes a lot of steps using dpkg -f install commands to update all dependencies)
  4. add the libRxTx library (http://mirrors.kernel.org/ubuntu/pool/universe/r/rxtx/librxtx-java_2.1.7-2_i386.deb). This is a set of drivers that allow communication over the USB port. This is the reason a LiveCD is a good solution, because otherwise all computers already setup and locked would have to be modified to have these drivers installed.
  5. get the Arduino software and copy it to a convenient location in the chrooted environment
  6. copy the SimpleMessageSystem software to arduino library folder
  7. copy nasm, gcc, emacs22 to chrooted environment
  8. come out of chroot
  9. create new ISO file version of liveCD
  10. reboot as regular Linux machine
  11. burn ISO version to DVD with k3b (because the new installed package make ISO larger than max size of CDRom)

Detailed notes can be found here

Testing Customization, Version 1

  1. Reboot from the newly customized LiveDVD.
  2. Find Arduino folder in /root and start Arduino app (Ubuntu will offer serveral options: choose run from Terminal)
  3. Make sure board and connection are set in tools menu.
  4. Load examples/digital/blink sketchbook
  5. Download it to Arduino.
  6. Reset Arduino
  7. LED should blink

Testing Customization, Version 2

  1. Open sketchbook library.simpleMessageSystem.example1
  2. Uploaded it to board
  3. Copy driver.c, asm_io.inc, asm_io.asm, and ledOn.asm from Assembly Program section above
  4. Compile and run the application as follows:
  nasm -f elf -d ELF_TYPE asm_io.asm
  nasm -f elf -d ELF_TYPE ledOn.asm
  gcc -o ledOn driver.c ledOn.o asm_io.o
  ./ledOn
Led should turn on. Feel free to create ledOff.asm to turn it off ;-)

Using a USB drive/mem-stick

Instead of installing Arduino on the liveCD, one could use a USB memory stick to keep a live version of Arduino and of the sketchbook. In this case the approach would be to

  1. Create a new distro of Ubuntu as above, but skip installation of Arduino software
  2. Plug a USB drive in a USB port and wait until Ubuntu recognizes it
  3. The icon for the new drive should appear on the Ubuntu Desktop
  4. Install Arduino software on new USB drive (get arduino-0011-linux.tgz or current version from http://www.arduino.cc/files)
  5. Installed SimpleMessageSystem package in Arduino library