arduino button tweets wee

tweets!: Screen Shot 2014-11-17 at 7.29.16 PM

fritzing:
Screen Shot 2014-11-17 at 7.38.11 PM

arduino pic:
IMG_4819

arduino code:

const int buttonPin = 7;     // the number of the pushbutton pin
 
int buttonState = 0;         // variable for reading the pushbutton status
 
void setup() 
{
//initialize serial communications at a 9600 baud rate
Serial.begin(9600);
 
pinMode(buttonPin, INPUT); 
}
 
void loop(){
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);
  Serial.print(buttonState);
 
  delay(10);
}

processing code:


import com.temboo.core.*;
import com.temboo.Library.Twitter.Tweets.*;

// Create a session using your Temboo account application details
TembooSession session = new TembooSession("clarence", "myFirstApp", "c7192b9a881f4d4cae8bbd3c39d9f897");

void setup() {
  // Run the StatusesUpdate Choreo function
  runStatusesUpdateChoreo();
}

void runStatusesUpdateChoreo() {
  // Create the Choreo object using your Temboo session
  StatusesUpdate statusesUpdateChoreo = new StatusesUpdate(session);

  // Set inputs
  statusesUpdateChoreo.setAccessToken("549952908-x2iw8OJ8mvhElgoYtB8BJBCaFwSHXJh3RPbgjeZY");
  statusesUpdateChoreo.setAccessTokenSecret("XOvV1qgaO9eaqAjGsrvKvxy1oFijBSOhI3hyJOWJv6qhc");
  statusesUpdateChoreo.setConsumerSecret("Z22ucs7ArRU2c2ta81KnmKOrLvvqkC1z21Dk6hC69gNieq7iVq");
  statusesUpdateChoreo.setStatusUpdate("CLARENCE LUVS THIS BEAUTIFUL WORLD");
  statusesUpdateChoreo.setConsumerKey("3sHH6QuXsowjA2eLIkk6MVSp4");

  // Run the Choreo and store the results
  StatusesUpdateResultSet statusesUpdateResults = statusesUpdateChoreo.run();
  
  // Print results
  println(statusesUpdateResults.getResponse());

}

Comments are closed.