Processing Bridge

Downloading and Installing Processing

Processing >> http://processing.org/download/
Because the Processing bridge uses the oscP5 library you need to download this and put the folder into your Processing libraries folder.
oscP5 library >> http://www.sojamo.de/libraries/oscP5/
Unzip and put the extracted oscP5 folder into the libraries folder of your processing sketches. Your processing libraries folder will be inside your sketchbook folder. By default this is normally here: “Documents >> Processing >> libraries”, or you can see the path by opening Processing and clicking in the top menu bar on: “Processing >> Preferences”, and then it will show you your sketchbook location, and let you change it if you want to.

The Processing sketch is missing the following code:

PFont fontA;
void setup() {
fontA = loadFont(“Helvetica-40.vlw”);
textFont(fontA, 32);
textAlign(LEFT);
}
and you need to add the font:
tools >> create font >> Helvetica-40 >> ok

Screenshot of Adam’s Processing bridge:

Adam’s GlovesData class covers all the receiving of the OSC messages, so all you need to do is include the class in your sketch (GlovesData.pde) and write code that makes use of the incoming sensor values. And you can also set the LED colours. You will find the GlovesData.pde file inside the TheGlovesProject processing example folder when you download it from the Bitbucket repository:
>> https://bitbucket.org/theglovesproject/bridges

Get Data

GlovesData gloves;
void setup() {
size(1000, 800);
gloves = new GlovesData();
}
void draw()
{
background(100);
fill(255,0,0);
rect(gloves.rollR,gloves.yawR,gloves.pitchL,gloves.pitchL);
}

Set LED Colours

gloves.setLeftLEDColour(red[0-255], green[0-255], blue[0-255]);
gloves.setRightLEDColour(red[0-255], green[0-255], blue[0-255]);

Processing Drawing Example

Code and description coming soon…

Processing Servo and Bottles Example

Code and description coming soon…

1 Comment so far

  1. The Gloves Project on September 27th, 2014

Leave a Reply