Party Ears

Made by Benjamin Hecht and Qin Bian

0

Intention

The goal behind our project was to find a way to show others that you are listening to music in a fun way. We wanted to visualize the way one listens to music to build a community.

0

Process

When we first got into our group, we started to brainstorm what kinds of ambient devices we wanted to make and what information we would like to explore. We floated the idea around to make a desk toy, a bracelet, a headband, and even something to put on one’s wall. However, we quickly decided that it would be most fun to create a wearable piece of technology. Furthermore, we decided to go with a headband that displayed some personal information.



After we decided on what product we wanted to make, we had to figure out what information we would gather. We discussed using one’s heart rate, one’s amount of messages they’ve received on social media, the music one is listening to, and even how long they have been on Facebook for. Since we were all fans of music, we all agreed to explore how we could represent the song a user is listening to in conjunction with headphones.

So we started to research what information we were able to get from Spotify, and how we could gather said information. We then split up our work, with half of us working on the Spotify Code and the other half figuring out what materials we would need to build a prototype.

In looking for supplies, we discovered that muli-colored LEDs would be the most versatile option. So we wired that up and housed them in pingpong balls attached to some sort of rod. Our original intention was to make the antenna of our device move around, but we had trouble with finding the right materials to make that happen.

We then wired up a second LED, attached it to a plastic rod, and made our first prototype, as seen below. Then we taped those onto a pair of over-the-ear headphones which can be seen in our video.



STORY BOARD


0

Product

The Party Ears are an all purpose headphone extension that brings the party from your ears to your head. It is a personal device that one would wear in public, on the subway, at the gym, etc. in order to let people know that you are listening to music, the user just wears the device on their head and connects their Spotify to the device, and the device will change color based on the genre of music that is currently playing. It uses blue for Jazz music, purple for songs from musicals, red for rock music, and a mixture of every color for Pop music. Our product randomly selects colors from the set of allowed colors based on the genre of music so that every listen is unique!

0
0

Code:

Below is the code that we used to create the project

0
int redPin= D0;
int greenPin = D2;
int bluePin = D1;
int c1 = 0;
int c2 = 0;
int c3 = 0;
String whatSong = "";
// int triggered = 0;
void setup(){
  // Subscribe to the integration response event
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
  Particle.subscribe("Spotify", myHandler, MY_DEVICES);
}
void loop(){
  // Get some data
  String data = String(10);
  // Trigger the integration
  Particle.publish("Spotify", data, PRIVATE);
  Serial.println("**************");
  Serial.println("What I'm playing right now?");
  for (int i = 0; i < 10; i ++){
    changeColor (c1, c2, c3);
    if (whatSong == "Jazz"){
      jazzSong(c1, c2, c3);
    } else if (whatSong == "Musical"){
      musicalNumber(c1, c2, c3);
    } else if (whatSong == "Pop"){
      popSong(c1, c2, c3);
    } else if (whatSong == "Rock") {
      rockSong(c1, c2, c3);
    } else {
      Serial.println("nothing is playing");
      setColor(255, 255, 255);
    }
  }
  // int c1 = rand()  % 255 ;
  // int c2 = rand()  % 255 ;
  // int c3 = rand()  % 255 ;
  // setColor(c1, c2, c3); // Random Color
  // delay(1000);
  // c1 = rand()  % 255 ;
  // c2 = rand()  % 255 ;
  // c3 = rand()  % 255 ;
  // setColor(c1, c2, c3); // Random Color
  // if(triggered == 1){
  //   Serial.println("TRIGGER");
  //   triggered = 0;
  // }
  // Wait 60 seconds
  delay(10000);
}
void changeColor(int c1, int c2, int c3){
  c1 = rand() %255;
  c2 = rand() %255;
  c3 = rand() % 255;
  setColor(c1, c2, c3);
  delay(2000);
}
void jazzSong(int c1, int c2, int c3){
  c1 = rand() % 90;
  c2 = rand() % 200 + 65;
  c3 = rand() % 255 + 200;
  setColor(c1, c2, c3);
  delay(2000);
}
void musicalNumber(int c1, int c2, int c3){
  c1 = rand() % 100;
  c2 = rand() % 250+230;
  c3 = rand() % 100;
  setColor(c1, c2, c3);
  delay(2000);
}
void popSong(int c1, int c2, int c3){
  c1 = rand() % 255;
  c2 = rand() % 255;
  c3 = rand() % 255;
  setColor(c1, c2, c3);
  delay(2000);
}
void rockSong(int c1, int c2, int c3){
  c1 = rand() % 255 + 230;
  c2 = rand() % 70;
  c3 = rand() % 70;
  setColor(c1, c2, c3);
  delay(2000);
}
void setColor(int redValue, int greenValue, int blueValue) {
  analogWrite(redPin, redValue);
  analogWrite(greenPin, greenValue);
  analogWrite(bluePin, blueValue);
}
void myHandler(const char *event, const char *data) {
  // Handle the integration response
  Serial.println("**************");
  Serial.println(data);
  if (strcmp(data,"L-O-V-E")==0){
    Serial.println("Yeah! L-O-V-E");
    whatSong = "Jazz";
  } else if (strcmp(data, "You&#39;re Welcome")==0){
    Serial.println("Yeah! You're welcome.");
    whatSong = "Musical";
  } else if (strcmp(data, "Love Never Felt so Good")==0){
    Serial.println("Yeah! Love never felt so good.");
    whatSong = "Pop";
  } else if (strcmp(data, "Another One Bites The Dust - Remastered 2011")==0) {
    Serial.println("Yeah! Another One.");
    whatSong = "Rock";
  } else {
    Serial.println("false");
    // whatSong = "";
  }
  // triggered = 1;
  Serial.println("**************");
}
Click to Expand
x
Share this Project

Courses

49313 Designing for the Internet of Things (Undergrad)

· 22 members

A hands-on introductory course exploring the Internet of Things and connected product experiences.


Focused on
About

~