A connected product - Bear Heart Beat is a life style product for intimacy improvement. When a bear is hugged, it will transfer the pressure to the other bear, and the bear will become warmer and start to glow. The frequency of Glowing will be decided by the pressure, the harder the hug, the faster it will blink. The product is designed for people to share the sense of intimacy and love.

Created: February 3rd, 2015

0

Bear-Heartbeat

0

Concept:

The concept of Bear Heart Beat is to visualize the intimacy between people. One Bear A is hugged by person A, the pressure of hugging will be passed to Bear B. With the reading of the pressure, Bear B will get warmer and start to blink, the blink frequency will be decided by the pressure, the larger the pressure, the faster the blink.

Design Process:

Our team has decided to work on a product that can be interesting and warm, and we have selected the move as hug. Hug is such a nice posture, shows people’s love, kindness and embracement.

We started to design our product with the behavior Hug.

After tested several different sensor including:

 Pulse Sensor

 Bend Sensor

 Light Sensor

We have selected the traditional pressure sensor to develop the product since it will be more robust if the loop is simple.

We were also thinking about what kind of visualized signal should be used, temperature and light became final choices since they are easily to be felt by people.

We are enhancing the hugging experience with this product design. 

0
int ledPin = D0;
int warmPin = D1;
int fsrPin = A0;
int fsrReading = 0;
int pressureValue = 0;
int reading = 0;
int press = 0;
int brightness = 0;
int speed = 0;

void setup() {
  pinMode(ledPin, OUTPUT);
  pinMode(warmPin, OUTPUT);
  pinMode(fsrPin, INPUT);

  Spark.variable(  "pressure" , &fsrReading , INT );  // From all devices!

  Spark.subscribe(  "db2015/hugged" , bearGlow );  // From all devices!
  //Spark.subscribe(  "db2015/servo-changed" , handleServoChange , MY_DEVICES);  // From your devices
  //Spark.subscribe(  "db2015/servo-changed" , handleServoChange , "53ff71066667574831282367");  // From a specific device


}

void loop()
{
  // read the value
  reading = analogRead(fsrPin);
  
  if( reading != fsrReading ){
    publishBearChange();
  }
  
  fsrReading = reading; 
  
  if( pressureValue > 0 ){
  
     brightness=map(pressureValue, 0, 4095, 0, 255);
     speed=map(pressureValue, 0, 4095, 3000,100);
  
      analogWrite(warmPin, brightness);
      analogWrite(ledPin, 255);
      delay(speed);
      analogWrite(ledPin, 0);
    delay(speed);
  }else{
    delay( 1000 );
  }
}

void bearGlow (const char *event, const char *data)
{
  // if there isn't data do nothing
  if (!data) return;
  
  if( strcmp( data, "STOP" ) == true )
  {
    pressureValue = -1;  
    return;
  }    
    
    
  press = atoi( data );
  
  if (!press) return;
  
  pressureValue = press;
  
  /*
  
  int brightness=map(press, 0, 4095, 0, 255);
  int speed=map(press, 0, 4095, 2000,500);
  
  analogWrite(warmPin, brightness);
  for( int i = 0 ; i < 5; i++ ){
  analogWrite(ledPin, 255);
  delay(speed);
  analogWrite(ledPin, 0);
  delay(speed);
  }
  */
}


// Publish an event saying that the
// Doorbell has been pushed
void publishBearChange()
{
  String data = "" ;
  data = data + fsrReading;
  if (fsrReading > 0)
    Spark.publish( "db2015/hugged", "" + data );
  else 
    Spark.publish( "db2015/hugged", "STOP" );
  
}
Click to Expand
0

CODE - We have worked our code based on the publish and subscribe function we have learned from the class.

In order to deal with the delay of the publishing, with the support from professor, we have set the program to publish when there's a different reading and also stop when the reading equals zero.

The key element of the code is to make sure the event publish works well and also how to successfully pass variable.

0

Hardware:

We have used pressure sensor as the key sensor for the prototype since it has a wide range of reading comparing against bend sensor.

Also we have used 2 LEDs as the signal, one will blink with the pressure while the other one will glow(representing heat)

0
x
Share this Project


About

A connected product - Bear Heart Beat is a life style product for intimacy improvement.
When a bear is hugged, it will transfer the pressure to the other bear, and the bear will become warmer and start to glow. The frequency of Glowing will be decided by the pressure, the harder the hug, the faster it will blink.
The product is designed for people to share the sense of intimacy and love.