As computing becomes more ubiquitous in our objects, designers need to be more aware of how to design meaningful interactions into electronically enhanced objects. At the University of Washington, a class of junior Interaction Design majors is exploring this question. These pages chronicle their efforts.

Wednesday, June 6, 2012

Shelby and Bridget: Q-Jumped

Often while standing in line—to pay at the grocery store, to purchase concert tickets, or to order coffee at a cafe—people experience frustration when others cut into the line. While it is not socially acceptable to cut into a line, there is also no appropriate way to respond if you are behind a person who has cut.


Q-Jumped enables people to react in a socially acceptable and anonymous manner to the frustrating situation of getting cut in line. Twitter, Processing, Arduino, and a seven-segment display work together to generate a physical response. The seven-segment display shows the number of tweets that report an incident of line-cutting.


CONCEPT BOARDS

















































BRIDGET AND SHELBY'S REFLECTIONS
We really enjoyed doing this project, and feel we learned a lot, both about coding and about basic electronics. Mostly, we learned how to learn, using the resources available to us (the internet, our peers, Dominic, and the community). It was really empowering to be able to not know how to do something very well, but to learn enough to figure out how to make a working prototype.
During our final presentation, we got some helpful feedback; some people suggested we offer more context within the prototype. This would create better interest in the project, as well as give people a sense of what the project is about. We plan on acting on this feedback this summer to improve our prototype.
Overall, we feel happy about the way that the project addresses the situation, and we really enjoyed the process.


RESOURCES WE USED FOR THIS PROJECT
Metrix Create:Space was an incredible resource, and really helped us with deciding on components and the overall setup.
A few online resources were also really helpful, and they are highlighted in these two blog posts: (1) (2).


ELECTRONIC COMPONENTS USED
84 red LEDs
14 75-ohm Resistors
2 SN7447 7-segment display drivers
wire wrap, jumper cables
1 Arduino Uno


CODE
processing:
import processing.serial.*;

import twitter4j.conf.*;
import twitter4j.internal.async.*;
import twitter4j.internal.org.json.*;
import twitter4j.internal.logging.*;
import twitter4j.json.*;
import twitter4j.internal.util.*;
import twitter4j.management.*;
import twitter4j.auth.*;
import twitter4j.api.*;
import twitter4j.util.*;
import twitter4j.internal.http.*;
import twitter4j.*;
import twitter4j.internal.json.*;

static String OAuthConsumerKey = "CONSUMER KEY";
static String OAuthConsumerSecret = "CONSUMER SECRET";
static String AccessToken = "ACCESS TOKEN";
static String AccessTokenSecret = "ACCESS TOKEN SECRET";

Serial arduino;
Twitter twitter = new TwitterFactory().getInstance();

String oldID = "";

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

void loginTwitter() {
twitter.setOAuthConsumer(OAuthConsumerKey, OAuthConsumerSecret);
AccessToken accessToken = loadAccessToken();
twitter.setOAuthAccessToken(accessToken);
}

private static AccessToken loadAccessToken() {
return new AccessToken(AccessToken, AccessTokenSecret);
}

void draw() {
background(0);
text("@cut_in_line", 35, 65);
getMention();
delay(15000); // wait 15 seconds to avoid Twitter Rate Limit
}


void getMention() {
List mentions = null;
try {
mentions = twitter.getMentions();
}
catch(TwitterException e) {
println("Exception: " + e + "; statusCode: " + e.getStatusCode());
}
Status status = (Status)mentions.get(0);
String newID = str(status.getId());
if (oldID.equals(newID) == false){
oldID = newID;
println(status.getText()+", by @"+status.getUser().getScreenName());
arduino.write(1); // arduino gets 1
}
}



arduino:
int seven_seg_digits[10][4] = {  { 0,0,0,0 },  // = 0
                                 { 0,0,0,1 },  // = 1
                                 { 0,0,1,0 },  // = 2
                                 { 0,0,1,1 },  // = 3
                                 { 0,1,0,0 },  // = 4
                                 { 0,1,0,1 },  // = 5
                                 { 0,1,1,0 },  // = 6
                                 { 0,1,1,1 },  // = 7
                                 { 1,0,0,0 },  // = 8
                                 { 1,0,0,1 }   // = 9
                               };
int tweetCount = 0;

void setup()
{
  Serial.begin(9600);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
}

void loop()
{
  listenToSerial();
}

void listenToSerial()
{
  int serialMsg = 0;
  if (Serial.available())
  {
    serialMsg = Serial.read();
    if (serialMsg == 1)
    {
      Display();
    }
  }
}

void Display()
{
  tweetCount++;
  int ones = 0;
  int tens = 0;
  ones = tweetCount % 10;
  tens = tweetCount / 10;
  int pinOnes = 6;
  for (int disp1 = 0; disp1 < 4; disp1++)
  {
    digitalWrite(pinOnes, seven_seg_digits[ones][disp1]);
    ++ pinOnes;
  }
  int pinTens = 10;
  for (int disp10 = 0; disp10 < 4; disp10++)
  {
    digitalWrite(pinTens, seven_seg_digits[tens][disp10]);
    ++ pinTens;
  }
}


VIDEO


Q-Jumped: Physical Prototype from Shelby Li on Vimeo.

No comments:

Post a Comment