Minnar – “I wish I could stop time”

People don’t really mean ‘I wish I could stop time’ in a literal sense; what they actually mean is ‘I wish this moment could last forever’ or ‘I want to be able to do this or that.’ I’m interested in exploring what it means when we can literally stop a clock from moving forward. The act of actually stopping time forces us to understand how futile and pointless it is for us to want to stop time when time is just a measure we believe dictates how our lives move. In reality, our perception of time slows or speeds depending on how we choose to make use of our time.

Using a relay, the red clock stops time whenever someone in the world tweets something containing the phrase “stop time.” The stop lasts a quarter of a second per character of the tweet (the stops range from 10 seconds to a couple minutes). Displayed next to the black clock at the accurate time, throughout the day the red clock slows to reveal the time we actually lose through wishing time would stop.


// Checks your account for a new tweet, parses it for a value (in the first "word"), and sends this value to an arduino

import twitter4j.conf.*;
import twitter4j.internal.async.*;
import twitter4j.internal.org.json.*;
import twitter4j.internal.logging.*;
import twitter4j.http.*;
import twitter4j.api.*;
import twitter4j.util.*;
import twitter4j.internal.http.*;
import twitter4j.*;
import processing.serial.*;

// HEY! GET YER OWN KEYS FROM: https://dev.twitter.com/apps/new
static String OAuthConsumerKey    = "9Qh0vcGVWo6CodugNOEX5A";
static String OAuthConsumerSecret = "WHVH4bkHDEN0x5DlkwkbZntARTJ7QkIhdPifGMfge0";
static String AccessToken         = "987214699-oyxzLFl6yqzTUMuA9RggpAHoZQtFfXR9lJxHutIi";
static String AccessTokenSecret   = "HRmGV4fjpbbVeZyMNsSAeuleTGKmD31FBCj1DXZp8";

Serial myArduinoSerial;
Twitter myTwitter = new TwitterFactory().getInstance();

String  myQueryWord = "\"stop time\"";  
long    previousIdOfTweetContainingQuery = 0;
int     tweetContainingQueryLength;

//===========================================================================
void setup() {
  size();
  size(125, 125);
  frameRate(10);
  background(0);
  println(Serial.list());
  String arduinoPort = Serial.list()[0];
  myArduinoSerial = new Serial(this, arduinoPort, 9600);
  loginTwitter();
}

//===========================================================================
void loginTwitter() {
  myTwitter.setOAuthConsumer (OAuthConsumerKey, OAuthConsumerSecret);
  AccessToken accessToken = new AccessToken(AccessToken, AccessTokenSecret);
  myTwitter.setOAuthAccessToken(accessToken);
}

//===========================================================================
void draw() {

  try {
    println ("Searching.... Current time = " + hour() + ":" + minute() + ":" + second()); 
    Query query = new Query(myQueryWord);
    query.setRpp (5); // how many results to fetch
    QueryResult result = myTwitter.search(query);

    ArrayList tweetsContainingQuery = (ArrayList) result.getTweets();
    if (tweetsContainingQuery.size() > 0) {
      Tweet mostRecentTweetContainingQuery = (Tweet) tweetsContainingQuery.get(0);
      long mostRecentTweetContainingQueryId = mostRecentTweetContainingQuery.getId();

      if (previousIdOfTweetContainingQuery == 0) {
        previousIdOfTweetContainingQuery = mostRecentTweetContainingQueryId;
      }
      if (mostRecentTweetContainingQueryId != previousIdOfTweetContainingQuery) {
        // yay! someone has just tweeted our favorite word!
        previousIdOfTweetContainingQuery = mostRecentTweetContainingQueryId;
        myArduinoSerial.write(1); // HERE IT IS!
          int pauseTime = (tweetContainingQueryLength * 250);
        delay(pauseTime);
        // print out the new tweet, for fun. 
        String user = mostRecentTweetContainingQuery.getFromUser();
        String msg = mostRecentTweetContainingQuery.getText();
        tweetContainingQueryLength = msg.length();
        Date d = mostRecentTweetContainingQuery.getCreatedAt();
        println("Tweet by " + user + " at " + d + ": " + msg + "Character Length = " + tweetContainingQueryLength);
      } else {
        myArduinoSerial.write(0);
    }
    }

    /*
    // Indicentally, you can also list all of the most recent tweets containing that search term. Fun!
    for (int i=0; i< tweetsContainingQuery.size(); i++) {
      Tweet t = (Tweet) tweetsContainingQuery.get(i);
      String user = t.getFromUser();
      String msg = t.getText();
      Date d = t.getCreatedAt();
      println("Tweet by " + user + " at " + d + ": " + msg);
    }
    println("--------------------");
    */

  }
  catch (TwitterException te) {
    println("Error connecting to Twitter: " + te);
  };

  delay (13000); 
}
void setup()
{
  // initialize the serial communication:
  Serial.begin(9600);
  pinMode(8, OUTPUT);
}

void loop() {
  // check if data has been sent from the computer:
  if (Serial.available()) {
    byte isOn = Serial.read();
    if (isOn == 1){
      digitalWrite(8, HIGH);
    } else {
      digitalWrite(8, LOW);
  }
}
}

Post a comment