Search This Blog

Thursday, June 30, 2011

Configuring the CMU Cam

This post is slightly off topic. This is because CMU-Cam is all together a very different platform. It has a video camera interfaced through serial ports.Its own image processing tools are available(of which I don't know anything right now).Also it has support for 4 servo motors.So,it can be used for making a simple bot.
As far as I have learnt that it can be programmed using C and the program has to be compiled for the ARM processor for which the CMU-cam people provide their own compiler.

So,here we go:
  • First of all make sure that you have following installed :
    • make(usually by default installed in linux systems)
    • Openssh(though I haven't understood its use yet)
    • Subversion
  • Now download the following from this page.
    • Linux ARM-gcc compiler
    • Linux LPC-ISP Installer
  • You will have to install these in a sub-folder of your home directory as root.You can add these locations to the $PATH variable or you will have to manually type their location(I did  manual thing because $PATH has to be modified every time the PC restarts.) 
  • Download the cc3 source by typing this :  svn co https://cc3.svn.sourceforge.net/svnroot/cc3/trunk cc3
  • Now we will Install gcc (the one developed by CMU people)
    • bunzip2 arm-200xqx-xx-arm-none-eabi-i686-pc-gnu.tar.bz2
    • tar -xvf  arm-200xqx-xx-arm-none-eabi-i686-pc-linux-gnu.tar
    • Add: /arm-200xqx/bin to your $PATH variable (rather I typed it manually)
  • Install LPC-ISP 
    • unzip lpc21isp_unix.zip
    • cd lpc21isp_unix
    • make
    • now add the directory with lpc21isp to your path variable as usual I used it manually
  • Now open a new terminal
    • go to cc3
    • type make
  • Start the camera in programming mode.(Hold the push button while powering on to start it in programming mode)
  • Load the com piled hex file
    • goto cc3/projects/cmucam2/
    • Assuming you have used a serial to usb-converter type
      ./lpc21isp cmucam2_lpc2106-cmucam3.hex /dev/ttyUSB0 115200 14746
      (instead of ./lpc21lisp you may have to type its location if you have not modified the $PATH variable )
  • Open the terminal
    • Power cycle the board(i.e. turn it off and again turn it on)
    • A green LED should turn on
    • If the code is running correctly,the blue and yellow LEDs will dimly illuminate
  • Now open minicom
    • Configure it as describe here .
    • Restart the board 
    • You should see the following 
      CMUcam2 v1.00 c6
      :
    • try typing "gv"(don't expect anything to be printed on screen) to see if two way serial communication is working

No comments:

Post a Comment