i'm trying to get a 3d model to turn whenever the button is pushed (thus activating pin 1 on the arduino). i have the breadboard and arduino wired up exactly as shown in the pushbutton example in the "getting started with arduino" book (with the exception of the wire being in pin 1, not pin 7).
if i'm not mistaken, this is an issue with the code. here's what i have.
what do i need to fix?
thanks!
import cc.arduino.*;
import processing.serial.*;
import saito.objloader.*;
Arduino arduino;
OBJModel model ;
float rotX, rotY, model_scale;
void setup()
{
size(800, 600, P3D);
arduino = new Arduino(this, Arduino.list()[0], 57600);
arduino.pinMode(1, Arduino.INPUT);
frameRate(30);
model = new OBJModel(this, "skull_interactive_lowres.OBJ", "absolute", QUADS);
model.enableDebug();
model.scale(160);
model.translateToCenter();
}
void draw()
{
background(0);
stroke(1);
noStroke();
lights();
pushMatrix();
translate(width/2, height/2, 0);
rotateX(rotY);
rotateY(rotX);
model.draw();
popMatrix();
// checks to see whether there's any voltage applied to pin 1,
i can't seem to add contributed libraries to my projects. when i first downloaded processing, i was able to successfully add the minim sound library. i think i must have changed something (like a file path) because when i try to add additional libraries (i'm specifically interested in the saito .obj loader) i can't load them at all even when i follow the instructions on the wiki exactly. as an experiment i tried deleting the minim library in order to deduce where the correct place was. mysteriously, after doing so, i was still able to use it to create sound. there must be a (hidden?) folder that i'm missing.
i think i even tried deleting processing from my computer with all my files (after backing them of course) and reinstalling it. i still ran into the same problem.
so, where is this directory, or whatever it is?
i have a mac. i'm also working out of the processing handbook by ben fry and casey reas....
i'm working on a simple processing app that loops a quicktime video (24.3mb in size). when i run the app it works perfectly, but when i export the app (for macosx), i just get a blank screen. i noticed that the quicktime is missing from the source and data folders. i'm sure it's simple, but what am i missing?
i know this is probably really simple and obvious, but where is the saito library once i've downloaded and unzipped the file from the google.code page?
i've tried copying the saito folder from the src folder to the library folder to no avail....