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

 

  1. Install processing on your machine from 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->Sketchbook->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.
    1. Structure->SetupDraw
    2. Structure->Loop
    3. Input->Mouse1D
    4. Input->MouseSignals
    5. Input->Constrain
    6. GUI->Button
  3. Install the FTDI USB Serial driver for the USB chip on the Arduino board we will hand out on Saturday: Windows executable, OS X >=10.4 on Intel Macs, OS X, Power PC or older Intels
  4. Download the Arduino library for Processing from our site (this version is NOT identical with the official version distributed on the Arduino site): arduino-processing-e231.zip. Inside you will find a folder called "arduino" that you should extract into your libraries folder of your Processing installation directory.
  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. Download all example code (ArduinoTutorial.zip) and extract the folder into your Processing examples/ directory.

More info on Processing is available at:


Page Information

  • 6 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts