So I've building on top of a sketch shared on instructables and have set almost everything up, I'm trying to make a chair tweet an update and take a photo on sit down via arduino and a reedswitch. Everything works EXCEPT the twitter part. (ftp photo uploads, reedswitch trigger, etc all are functional and operating correctly)
I've discovered that Twitter has changed and will now only accept Oauth. Here is my code below, can anyone help me morph this into OAuth friendly code? I've already created an app on dev.twitter and have all the info to input but I was looking at robotgrrrls processing/tweetcode and i'm a little overwhelmed on where to try and mash her code into this...
Hi Everyone, I'm still not well versed in processing, I'm a really good copy pasta and get the notion of what I'm doing most of the time.
I'm tinkering with OpenCv and have built an array into the Face Tracking demo. I've been successful in randomizing the image that load but I'd like to get each face to take on a unique image vs all in frame at once taking on the same... if you have any thoughts you would make me a much more sane person.
I began to implement Daniel Shiffman's timer class to break out the time between faces but I'm not really sure if that's the right solve. Any thoughts and/or additional solves would be extremely appreciated because I'm really not sure how to do this and I've been been staring at my monitor with red eyes for WAY too long.
Here is a link to the sketch with the /data folder [images] and the timer class.
// contrast/brightness values
int contrast_value = 0;
int brightness_value = 0;
int index = 0;
//TIMER INITIALIZE
Timer timer;
void setup() {
size( 640,480, P2D );
//size(854,486);
smooth();
//TIMER SETUP
timer = new Timer(5000);
timer.start();
opencv = new OpenCV( this );
opencv.capture( width , height ); // open video stream
opencv.cascade( OpenCV.CASCADE_FRONTALFACE_ALT ); // load detection description, here-> front face detection : "haarcascade_frontalface_alt.xml"
// print usage
println( "Drag mouse on X-axis inside this sketch window to change contrast" );
println( "Drag mouse on Y-axis inside this sketch window to change brightness" );
// Starting the timer
void start() {
// When the timer starts it stores the current time in milliseconds.
savedTime = millis();
}
// The function isFinished() returns true if 5,000 ms have passed.
// The work of the timer is farmed out to this method.
boolean isFinished() {
// Check how much time has passed
int passedTime = millis()- savedTime;
if (passedTime > totalTime) {
return true;
} else {
return false;
}
}
}