TutorialProcessingSetup


Complete these steps BEFORE the tutorial on 2/17 - we have a packed schedule and not enough time to walk everyone through the software setup. Email wendyju at stanford.edu if you are having problems with the setup.

 

  1. Install processing on your machine from http://processing.org/download

    (PC users: get the full version with Java.)

     

  2. Get familiar with the Processing interface by going through the following introductory tutorials (all accessible through File->Examples). Look through the code and comments, run the sketch, make sure you understand how it works, maybe play with it and change its behavior. (This should take ~10-15 minutes.)
    1. Basics->Structure->SetupDraw
    2. Basics->Structure->Loop
    3. Basics->Input->Mouse1D
    4. Basics->Input->MouseSignals
    5. Basics->Input->Constrain
    6. Topics->GUI->Button

       

  3. Install the FTDI USB Serial driver for the USB chip on the Arduino board we will hand out on Wednesday:Windows executableOS X >=10.4 on Intel MacsOS X, Power PC or older Intels

     

  4. Download our Arduino library for Processing: arduino_library.zip

    (Note: this version is NOT identical with the official version distributed on the Arduino site)

    Inside the zip file, you will find a folder called "arduino". Now, first create a folder called "libraries" inside your "Processing" directory and put the "arduino" folder inside of it. (On the Mac, the "Processing" directory is inside your Documents folder by default. On the PC, the "Processing" directory is in My Documents by default.) If you are currently running Processing, you will have to quit and restart Processing in order for the new library to be recognized. When it is restarted, you should see the option of "arduino" when you go to Sketch->Import Library.

     

  5. After extracting the library files, start Processing and run this test to verify that the library is installed correctly. Processing code (test_arduino.zip):
    /*
    * Test Arduino library
    */

    import processing.serial.*;
    import cc.arduino.*;

    Arduino arduino;
    void setup() {
    size(200, 200);
    noLoop();
    println(Arduino.list());
    }

    void draw() {
    }
    The output in the console window below the source code should be something like this ON A PC:
    Stable Library
    =========================================
    Native lib Version = RXTX-2.1-7
    Java lib Version = RXTX-2.1-7
    [0] "COM1"
    and something like this on a Mac:
    Stable Library
    =========================================
    Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7
    [0] "/dev/tty.Bluetooth-PDA-Sync"
    [1] "/dev/cu.Bluetooth-PDA-Sync"
    [2] "/dev/tty.Bluetooth-Modem"
    [3] "/dev/cu.Bluetooth-Modem"
  6. Make a folder called "examples" in your "Processing" folder. Download all example code (arduino_examples.zip) and extract the folder into your Processing/examples/ directory.

     

More info on Processing is available at: