Latest Updates: processing RSS

  • Unity + Processing Demo

    Ellen 10:11 on July 2, 2012 | 6 Permalink | Reply
    Tags: osc, , processing,

    Test your Unity project with the Processing Osc Demo. Send your events through the Processing app and see them appear in the Unity project. There is also a timer in Processing sending events at all time changing the width of a cube in Unity. Download the Unity OSC example here.

  • Heavy duty pull sensors

    Ellen 18:21 on June 25, 2012 | 0 Permalink | Reply
    Tags: , , processing,

    Interacting with installations with a long life time we turn to heavy duty sensors that can handle a lot of cycles. The string and pull sensors below can handle more than a million cycles and are built for industrial use. They can also be connected to circuit board like Arduino.

    Check out all the pull sensors and string pots from Celesco. Novotechnik also offers a wide range of pull sensors.

    Check out this Processing and Arduino project by nhw3030 with Celesco string sensors.

  • Unity + Processing + Arduino

    Ellen 10:32 on May 31, 2012 | 18 Permalink | Reply
    Tags: , , , processing,

    I did a test connecting Arduino and Unity with the help of Processing and a Open Sound Control library. When I am pushing the Flexi Force sensor the values affect a cube within Unity. To get this setup do the following:

    Load the Standard Firmdata on to your Arduino. Check out a full Arduino + Processing tutorial to get the setup.

    Download the oscP5 processing library and put it in your Processing sketch folder in the folder libraries.

    Initialize oscP5 library and broadcast data to port 12000. The port Unity will listen to.
    Add the remote location to listen to on port 3200. If Unity would broadcast event in this example, the broadcast port would be set to 3200. Initialise Arduino to be used later on.

    oscP5 = new OscP5(this,12000);
      myRemoteLocation = new NetAddress("",3200);
      arduino = new Arduino(this, Arduino.list()[0], 57600);

    In the draw function we read the analoge pin 0 to get sensor values from the Flexi Force sensor. Set the OSC message to flexiforce. Unity will listen to this label. Add the message of the sensor value into the osc message with add method. This method can take numbers, strings and byte data.

    float flexiforceSensor = arduino.analogRead(0);
    OscMessage oscMess = new OscMessage("/flexiforce");

    oscP5.send(oscMess, myRemoteLocation);

    The entire Processing sketch can be seen here.

    In Unity you can import the Osc.cs and UDPPacketIO.cs to broadcast and listen to UDP data.

    Set up the corresponding host and ports in your Unity script.

    public var OSCHost : String = "";
    public var SendToPort : int = 3200;
    public var ListenerPort : int = 12000;

    Import the UDPPacketIO and Osc components and feed in the host and ports. Add your specific label of your osc message and what method to call when receiving this event from Processing.

    var udp : UDPPacketIO = GetComponent("UDPPacketIO");
    udp.init(OSCHost, SendToPort, ListenerPort);
    handler = GetComponent("Osc");
    handler.SetAddressHandler("/flexiforce", AffectObject);

    In the receiving method you can print out the label and message values. In this case the sensor value from the Flexi Force. The cube will change width when getting a new value from Processing.

    public function AffectObject(oscMessage : OscMessage) : void
            Debug.Log("Event name: " + Osc.OscMessageToString(oscMessage));
            Debug.Log("Event data: " + oscMessage.Values[0]);
            var myCube = GameObject.Find("Cube");
            var boxWidth:int = 8 - ( oscMessage.Values[0]);
            myCube.transform.localScale = Vector3(boxWidth,5,5);

  • Geek Girl Meetup 2011

    Ellen 07:10 on May 30, 2011 | 1 Permalink | Reply
    Tags: , , ggm11, processing


    Inspiring times at this year’s Geek Girl Meetup in Stockholm. See my session on Input / Output – Creative technology with electronics where I demo some of my projects. Only in Swedish :-/

  • Turn on lamp with iPhone 0.3

    Ellen 21:58 on May 24, 2011 | 3 Permalink | Reply
    Tags: , corona sdk, , , processing

    My first test of controlling the Arduino outputs from an iPhone app. I use the firmware for Arduino and a Processing script checking if the light is on or off and sending the info to the Arduino board and the lamp. Code will soon see the light here.

  • Get Processing and Arduino to talk

    Ellen 15:58 on May 13, 2011 | 66 Permalink | Reply
    Tags: , Duemilanove, , processing, RXTX

    I want to use the muscles of Processing to get my Arduino do really cool stuff. In order to do this I want both of the softwares to talk to each other. It proves to be a bumpy road depending on versions of you Arduino board and processing. My set up is a Mac OS X 10.6.7, Arduino board Duemilanove with Atmega328. If you already have the Arduino and Processing software installed do the following:

    1. Download the Processing library, unzip it.
    2. Put the folder “arduino” inside a folder that you call “libraries” within your Processing Sketchbook folder.
    3. Connect your Arduino board and open up the Arduino software, upload the sketch StandardFirmata from Examples/Firmata. Close Arduino software.
    4. Add a LED diod to pins Ground and 13 on the Arduino board and run the following code in Processing:

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

    Arduino arduino;
    int ledPin = 13;

    void setup()
    arduino = new Arduino(this, Arduino.list()[0], 57600);
    arduino.pinMode(ledPin, Arduino.OUTPUT);

    void draw()
    arduino.digitalWrite(ledPin, Arduino.HIGH);
    arduino.digitalWrite(ledPin, Arduino.LOW);

    Whoohooo!!!! You should now see your LED blinking on and off.


    Mismatch of RXTX libraries
    When running your Processing sketch the following error can occur:

    WARNING:  RXTX Version mismatch
    Jar version            = RXTX-2.2pre1
    native lib Version  = RXTX-2.2pre2

    1. Download the latest RXTX library from

    2. Find the files librxtxSerial.jnilib and RXTXcomm.jar in the unzipped folder structure: MACOSX_IDE/ForPackageMaker/Install/Java/Extensions

    3. Copy the 2 files into the folder: Harddrive/Library/Java/Extensions

    4. Close down Processing and right-click on the application in the “Applications”-folder and select “Show Package Contents”. Go to folder “Contents/Resources/Java/modes/java/libraries/serial/library”. Replace the old RXTXcomm.jar with the new file in this folder.

    5. Replace the file librxtxSerial.jnilib with the new file in the “macosx” folder “Contents/Resources/Java/modes/java/libraries/serial/library/macosx”.

    6. In order for this to work properly also follow these steps taken from here:

    1. Under Finder click on the “Go” Menu
    2. Select “Go to Folder…”
    3. Type “/var/”
    4. Finder will open var folder.
    5. Right click on folder named “lock” and select “Get info”
    6. Open drop arrow titled “Sharing & Permissions”
    7. I set all privileges to: “Read & Write”
    8. Close Info
    9. Go to the Var folder on the finder and open the “spool” folder
    10. Right click on folder named “uucp” and select “Get info”
    11. Open drop arrow titled “Sharing & Permissions”
    12. I set all privileges to: “Read & Write”
    13. Close Info
    14. DONE

    7. Restart your computer and Processing. The output you should see is:

    Stable Library
    Native lib Version = RXTX-2.1-7
    Java lib Version   = RXTX-2.1-7

    RXTX Warning
    If you got this warning. Make sure you went trough the entire step 6 in the previous block and that the user you are logged in as have the permissions to read & write on these files.

    RXTX Warning:  Removing stale lock file. /var/spool/lock/LK.255.000.134

compose new post
next post/next comment
previous post/previous comment
show/hide comments
go to top