Hotspot

Know where your friends are aroud the world with a glance

Made by Hanyue Hu, Ming Li, Mo Zhang, queenien2000 and shianhey

HOTSPOT is a dynamic wallpaper, with the pattern of the world map. It's connected with Twitter account, and could show where your friend is through the movement of the wallpaper. For example, when one of your friend Twitter something at Sydney, Sydney Opera House, the landmark of Sydney will pop out on your wall paper.

Created: February 10th, 2015

0

Overview

Your friends are traveling all around the world. How do you know where your friends are? Social media like Twitter, Facebook, could tell you where they are when they post news. But you need to check your social media and read each post closely and you won't have a overall idea of all your friends' locations. HOTSPOT  gives you the answer with just a glance.

HOTSPOT is a dynamic wallpaper, with the pattern of the world map. It's connected with Twitter account, and could show where your friends are through the movement of the wallpaper. For example, when one of your friend Twitter something at Sydney, Sydney Opera House, the landmark of Sydney will pop out on your wall paper.

With just a glimpse of the wallpaper, you could know where your friends are in real time. The moving of the landmark is the moving of your friends. Watch your relations growing all over the world!

How it works

Methods: We use IFFTT twitter recipe to connect our spark with the online data. Once anyone publishes a tweet in the specific location we get the username data and run our function.

Bill of Materials

Spark Microcontroller

Breadboard

Jumper Wires

Four Servo Motors

Four RGB LEDs

Cardboard

Fritzing Diagram

0

Code

0
int redPin = A0;    
int greenPin = D0;  
int bluePin = D1;
 
int redValue = 255; // Full brightness for an Cathode RGB LED is 0, and off 255
int greenValue = 255; // Full brightness for an Cathode RGB LED is 0, and off 255
int blueValue = 255; // Full brightness for an Cathode RGB LED is 0, and off 255
 
int redPin1 = A6;    // RED pin of the LED to PWM pin **A0**
int greenPin1 = A1;  // GREEN pin of the LED to PWM pin **D0**
int bluePin1 = A4;
 
int redValue1 = 255; // Full brightness for an Cathode RGB LED is 0, and off 255
int greenValue1 = 255; // Full brightness for an Cathode RGB LED is 0, and off 255
int blueValue1= 255;

int pos = 0;
Servo myservo;

void setup()
{
  // Set up our pins for output
  pinMode( redPin, OUTPUT);
  pinMode( greenPin, OUTPUT);
  pinMode( bluePin, OUTPUT);

  analogWrite( redPin, 155);
  analogWrite( greenPin, 155);
  analogWrite( bluePin, 155);

  pinMode( redPin1, OUTPUT);
  pinMode( greenPin1, OUTPUT);
  pinMode( bluePin1, OUTPUT);

  analogWrite( redPin1, 255);
  analogWrite( greenPin1,255);
  analogWrite( bluePin1, 255);

  
  Spark.subscribe(  "CragTweetHY/Event" , handleDoorbellPush2 );


  

}

void run3()
{

  myservo.attach(A7);
  analogWrite( redPin, 255);
  analogWrite( greenPin, 0);
  analogWrite( bluePin, 0);

  for(pos = 180; pos > =120; pos -= 1)  // goes from 0 degrees to 180 degrees
  {                                  // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(60);                       // waits 15ms for the servo to reach the position
  }

  delay(10000);
  for(pos = 120; pos<=180; pos+=1)     // goes from 180 degrees to 0 degrees
  {
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(60);                       // waits 15ms for the servo to reach the position
  }

  myservo.detach();



}





void run4()
{

  myservo.attach(A5);
  analogWrite( redPin1, 0);
  analogWrite( greenPin1, 0);
  analogWrite( bluePin1, 255);


  for(pos = 180; pos > =120; pos -= 1)  // goes from 0 degrees to 180 degrees
  {                                  // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(60);                       // waits 15ms for the servo to reach the position
  }

  delay(10000);
  for(pos = 120; pos<=180; pos+=1)     // goes from 180 degrees to 0 degrees
  {
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(60);                       // waits 15ms for the servo to reach the position
  }

  myservo.detach();



}


void handleDoorbellPush2(const char *event, const char *data)

{

    if(strcmp(data ,"ZhangMore") == 0)
    run3();
    if(strcmp(data ,"ShianHeyu") == 0)
    run4();

}
Click to Expand
0
int redPin = A0;    // RED pin of the LED to PWM pin **A0**
int greenPin = D0;  // GREEN pin of the LED to PWM pin **D0**
int bluePin = D1;
  
int redValue = 255; // Full brightness for an Cathode RGB LED is 0, and off 255
int greenValue = 255; // Full brightness for an Cathode RGB LED is 0, and off 255
int blueValue = 255;

int redPin1 = A4;    // RED pin of the LED to PWM pin **A0**
int greenPin1 = A5;  // GREEN pin of the LED to PWM pin **D0**
int bluePin1 = A7;
  
int redValue1 = 255; // Full brightness for an Cathode RGB LED is 0, and off 255
int greenValue1 = 255; // Full brightness for an Cathode RGB LED is 0, and off 255
int blueValue1 = 255; // Full brightness for an Cathode RGB LED is 0, and off 255
Servo myservo;  // create servo object to control a servo
                // a maximum of eight servo objects can be created

int pos = 0;

void setup()
{
  // Set up our pins for output
  pinMode( redPin, OUTPUT);
  pinMode( greenPin, OUTPUT);
  pinMode( bluePin, OUTPUT);

  analogWrite( redPin, 255);
  analogWrite( greenPin, 255);
  analogWrite( bluePin, 255);

  pinMode( redPin1, OUTPUT);
  pinMode( greenPin1, OUTPUT);
  pinMode( bluePin1, OUTPUT);

  analogWrite( redPin1, 255);
  analogWrite( greenPin1, 255);
  analogWrite( bluePin1, 255);


  //Register our Spark function here

  Spark.subscribe(  "LocationTweetLM/PittsburghEvent" , handleDoorbellPush );


  // turn them all off...

}



void run1()
{

  myservo.attach(A6);
  analogWrite( redPin, 0);
  analogWrite( greenPin, 0);
  analogWrite( bluePin, 255);

for(pos = 180; pos >=120; pos -= 1)  // goes from 0 degrees to 180 degrees
{                                  // in steps of 1 degree
  myservo.write(pos);              // tell servo to go to position in variable 'pos'
  delay(60);                       // waits 15ms for the servo to reach the position
}

delay(10000);

for(pos = 120; pos<=180; pos+=1)     // goes from 180 degrees to 0 degrees
{
  myservo.write(pos);              // tell servo to go to position in variable 'pos'
  delay(60);                       // waits 15ms for the servo to reach the position
}

myservo.detach();




}


void run2()
{

  myservo.attach(A1);
  analogWrite( redPin1, 255);
  analogWrite( greenPin1, 0);
  analogWrite( bluePin1, 0);

for(pos = 180; pos >=120; pos -= 1)  // goes from 0 degrees to 180 degrees
{                                  // in steps of 1 degree
  myservo.write(pos);              // tell servo to go to position in variable 'pos'
  delay(60);                       // waits 15ms for the servo to reach the position
}

delay(10000);

for(pos = 120; pos<=180; pos+=1)     // goes from 180 degrees to 0 degrees
{
  myservo.write(pos);              // tell servo to go to position in variable 'pos'
  delay(60);                       // waits 15ms for the servo to reach the position
}

myservo.detach();




}
void handleDoorbellPush(const char *event, const char *data)

{
    if(strcmp(data ,"HanyuHu") == 0)
    run1();
    if(strcmp(data ,"fleuraly") == 0)
    run2();


}
Click to Expand
0

Prototyping

0
0

Music and Video examples generated from" One day in Beijing", "10 days in Taiwan"," Days in Paris", "New York Days".

Also thank Ankita, Alanna, Caitlin and Lu ! Excellent actors !

x
Share this Project


About

HOTSPOT is a dynamic wallpaper, with the pattern of the world map. It's connected with Twitter account, and could show where your friend is through the movement of the wallpaper. For example, when one of your friend Twitter something at Sydney, Sydney Opera House, the landmark of Sydney will pop out on your wall paper.