Feeling the World

 

Abstract

The goal of this project is to provide a physical dashboard that displays how people are feeling. So maybe we feel like knowing how do wimen in tokyo feel when its raining, or how does the world feels right now, or even find out if men are feel better when it’s sunny outside.  

Physical Sketch

 

System Diagram

 

Skills List

Visual Data Representation in Processing

Acrylic or Glass manipulation

Retro-Projecting techniques

Multi-Sensing Techniques

Parts List

Acrylic or other material surface

Projector

LCD or other Projector

Small LEDs

Various Sensors (light, infrared, temperature, etc)

 

Timeline

Week 1: Mock-up virtual display and Working Code 

Week 2: First Physical interface prototype

Week 3: Full interface prototype

Week 4: Final Physical interface

We feel fine

 

 

 

 

 

 

 

 

Idea: Use data gathered from the we feel fine project and display it using the arduino. A query is launched from processing asking for some feelings of persons in pittsburgh and then tranformed into a percentage of bad/good feelings which are assigned to an amount of a certain colour (blue for bad, red for good).

When there is a change in the world, the LED blinks and updates its status.

 

Processing Code:

 

import processing.xml.*;

import processing.serial.*;

 

Serial myPort;  // Create object from Serial class

int val;        // Data received from the serial port

XMLElement xml;

int lastPerGood=0;

int lastPerBad=0;

String buff = “”;

int NEWLINE = 10;

 

void setup() {

  size(200, 200);

  println(Serial.list());

  String portName = Serial.list()[0];

  myPort = new Serial(this, portName, 9600);

}

 

void draw() {

  background(255);

  int good=0;

  int bad=0;

  int total=0;

  int perGood=0;

  int perBad=0;

  

  xml = new XMLElement(this, “http://api.wefeelfine.org:8080/ShowFeelings?display=xml&returnfields=sentence,%20feeling&limit=500&city=Pittsburgh”);

  

  int numSentences = xml.getChildCount();

  

  for (int i = 0; i < numSentences; i++) {

    XMLElement kid = xml.getChild(i);

    String id = kid.getStringAttribute(“feeling”); 

    if(id!=null){

      if(id.equals(“good”)||id.equals(“happy”)||id.equals(“better”)){

        good=good+1;

        total=total+1;

      }

      if(id.equals(“bad”)||id.equals(“sad”)||id.equals(“worse”)){

        bad=bad+1;

        total=total+1;

      }

    }

  }

  

  println(“feeeling…”);

  perGood=(good*100/total);

  perBad=(bad*100/total);

  if(perGood!=lastPerGood || perBad!=lastPerBad){

    lastPerGood=perGood;

    lastPerBad=perBad;

    println(“\nTotal:”+total+”  Good:”+good+”  Bad:”+bad);

    println(“Good(%):”+perGood+”  Bad(%):”+perBad);

    myPort.write(255);

  }

 myPort.write(perBad);

  println(perBad);

  delay(3000);

   

}

 

 

Arduino Code:

 

 

int ledBluePin = 9;

int ledRedPin=10;

void setup()

{

  // begin the serial communication

  Serial.begin(9600);

  pinMode(ledBluePin, OUTPUT);

  pinMode(ledRedPin, OUTPUT);

}

 

void loop()

{

  byte val;

  

  analogWrite(ledRedPin,200);

  // check if data has been sent from the computer

  if (Serial.available()) {

    // read the most recent byte (which will be from 0 to 255)

    val = Serial.read();

    if(val==255) blink() else analogWrite(ledBluePin, val*3);

    // set the brightness of the LED

  }

}

 

 

void blink(){

  int i=0;

  while(i<=10){

  analogWrite(ledRedPin, 0);

  delay(100);

  analogWrite(ledRedPin, 255);

  delay(100);

  i=i+1;

  }

}

Goal!T!Shirt

 

Idea: The idea here was to create a awesome T-shirt to wear while watching your soccer team crushing the opponents. Every time you celebrate a goal the t-shirt will display a huge blinking G in the back. The blinking speed is affected by how many goals your team scored, the more the faster. 

For this project I used a luminescent wire, one mercury sensor, and a relay to control the blinking of the G which was powered externally.

 

Circuit:

CODE:

 

 

 

int sensPin = 2;    // input pin for the Mercury Sensor

int ledPin = 8;   // output pin for Luminiscent Wire

int val;

int blink=1000;

boolean goal=false;

 

void setup() {

  pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT

  pinMode(sensPin, INPUT);

  //Serial.begin(9600);

}

 

void loop() {

 

 

  val=digitalRead(sensPin);

  if(val==LOW){

    digitalWrite(ledPin, HIGH);

    delay(blink);

    digitalWrite(ledPin, LOW);

    delay(blink);

    if(goal==false){

      blink=blink-200;

      if(blink<0) blink=1000;

      goal=true;

     }

   }

  if(val==HIGH){

    goal=false;

  }

}

Paparazzi Status-Quo

      

 

Idea: The idea here is to have a meter for how “hot” you are to all those photographers outside the club, the circuit I used was similar to the party underwear project, but the code is completely different. Ambient Light controls the speed of which the LED blinks, the dimmer the ambient light is, the faster it blinks. Also we keep a state record, if you get flashed by a camera your status-quo is increased and the intensity of the LED will become higher , Indicating everyone inside the club that you are tonights “hotshot”

 

Circuit:

 

Code:

 

 

 

int sensPin = 2;    // input pin for the LDR

int ledPin = 11;   // output pin for LEDs

int ambientLight = 0;       // variable to store the value coming from the sensor

int photos=0;

int lightPow=20;

void setup() {

  pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT

  Serial.begin(9600);

}

 

void loop() {

  //delayTime=2000-(photos*100);

  

  ambientLight = analogRead(sensPin);    // //How bright is it outside

  Serial.println(ambientLight);

 if(ambientLight>600){                 // You got photographed

      lightPow=lightPow+10;

  }

  analogWrite(ledPin, lightPow);   

  delay( ambientLight*2 );   //Blink Blink

  analogWrite(ledPin, 0);

  delay( ambientLight*2 );

}

Party Underwear

Did you ever wonder how to turn a casual night into a fun game? Here’s the solution..



CIRCUIT

CODE


/*

 * Party Underwear

* by Andre Doria

*

* Turns on and off a light emitting diode(LED) connected to digital

* pin 13. The light is only turned on when the sensed ambient light

* is below a given number, obtained by analogRead() in pin 2 using

* a LDR

*/

int sensPin = 2;    // input pin for the LDR

int ledPin = 13;   // output pin for LEDs

int ambientLight = 0;       // variable to store the value coming from the sensor

void setup() {

pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT

}

void loop() {

delay(100);

ambientLight = analogRead(sensPin);    // read the value from the LDR sensor

if(ambientLight<380){                 // If its dark

digitalWrite(ledPin, HIGH);  // turn the ledPin on

}else{                           // If its bright

digitalWrite(ledPin, LOW);   // turn the ledPin off

 }
}