Teddy Needs a Hug!

Made by Mohamed Yassin, Hua Fan and sashwani

Found in DIoT 2018 3: Connected Intimacy

A teddy bear that connects two partners in contexts where they don't have access to cell phones.

Teddy Hug
Hua Fan - https://youtu.be/Ukc9Ib2xaJQ


There is an increasing number of couples who either due to work, education opportunities or situations that are out of their hands find themselves in long distance relationships. One of the key factors that sustains a long distance relationship is frequent communication that feels intimate and personal. While there are a lot of different means of communication available, there aren’t any communication means where the object of communication reminds the person of their significant other.



This paired device, a pair of two teddy bears, helps a student who just got arrested after a demonstration connect with his wife in a subtle and rudimentary but powerful way. It helps him convey that he is thinking about her with just a few lines of recorded message that are very personal to his partner. He is in a situation where no smart phones or laptops are allowed.



Our main concern was finding the appropriate context to design for. what is meant by appropriate is where the product will be more useful to the user than a conventional communication means. Ideally, where there is no allowed regular communication at all (army contexts or prisoners). After a couple of iterations we were inspired by black mirrors episode "Black museum" to embed a communication system in a teddy bear. We felt that all what a solider in a foreign country or a prisoner needs is to check on their loved ones and say "I love you" or "I need a hug" when he is feeling down and receives  response in the same way.  

For the prototype itself, we cared about all buttons and speakers to be as inconspicuous as possible because that's the whole of the device, is to not show up as a walkie talkie. rather, a normal smart teddy bear that helps you check on your loved ones. 



Bill of Materials

1. Breadboard * 2

2. Photon * 2

3. Speaker * 2

4. DFPlayer * 2

5. Buttons * 4

6. Wires

7. Teddy Bears * 2


# define Start_Byte 0x7E
# define Version_Byte 0xFF
# define Command_Length 0x06
# define End_Byte 0xEF
# define Acknowledge 0x00 //Returns info with command 0x41 [0x01: info, 0x00: no info]
// This value will store the last time we published an event
long lastPublishedAt = 0;
// this is the time delay before we should publish a new event
// from this device
int publishAfter = 1000;
int buttonPin1 = D0;
int buttonPin2 = D1;

void setup()

pinMode( buttonPin1, INPUT_PULLUP); // sets pin as input
pinMode( buttonPin2, INPUT_PULLUP);


execute_CMD(0x3F, 0, 0); // Send request for initialization parameters

while (Serial1.available()<10) // Wait until initialization parameters are received
delay(30); // Pretty long delays between successive commands needed 
// Initialize sound to very low volume. Adapt according used speaker and wanted volume
execute_CMD(0x06, 0, 90); // Set the volume (0x00~0x30)

// Basically this will match any event that starts with "loveyou" or "hug" to figure out if our event comes from this device or another

Particle.subscribe(  "loveyou" , handleSharedEvent );
Particle.subscribe(  "hug" , handleSharedEvent );
void loop ()



void publishMyEvent()

    if( lastPublishedAt + publishAfter < millis()){

if( digitalRead( buttonPin1 ) == LOW )
      // System.deviceID() provides an easy way to extract the device
    //event name appended with device id to get a unique identifier for the device
    String eventName = "loveyou" + System.deviceID();


else if( digitalRead( buttonPin2 ) == LOW )

    String eventName = "hug" + System.deviceID();
        // share it out and this will get shared out to all devices
    lastPublishedAt = millis();


void execute_CMD(byte CMD, byte Par1, byte Par2) // Excecute the command and parameters
   if( lastPublishedAt + publishAfter < millis() )

    lastPublishedAt = millis();

  // }
// Calculate the checksum (2 bytes)
int16_t checksum = -(Version_Byte + Command_Length + CMD + Acknowledge + Par1 + Par2);

// Build the command line
byte Command_line[10] = { Start_Byte, Version_Byte, Command_Length, CMD, Acknowledge, Par1, Par2, checksum >> 8, checksum & 0xFF, End_Byte};

//Send the command line to the module
for (byte k=0; k<10; k++)
Serial1.write( Command_line[k]);

void handleSharedEvent(const char *event, const char *data)
  String eventName = String( event ); // convert to a string object
  String dataStr = String( data ); // convert to a string
  String deviceID = System.deviceID();//get the device id

   if( eventName.indexOf(deviceID) != -1 )
       // It Returns: The index of val within the String, or -1 if not found.
// if we get anything other than -1 the event came from this device so stop doing stuff
 //else do stuff corresponding to the paired device
  if( dataStr.equals( "button1" ))
      //play the first song

  else if( dataStr.equals( "button2" ))
  {     //play the second song

Click to Expand


With every project we grasp how connected devices still have a long way to go.  A big potential is there requiring more useful products. For sensitive topics like intimacy alone we're coming with tons of ideas having no clue which one to try and prototype. Also. we felt we are still a bit constrained by the capabilities we have and our skills to build up a model and do the necessary programming. we really enjoyed working on this one, we were inspired by a Netflix show and we ended up doing something very similar. 

Share this Project


49713 Designing for the Internet of Things

· 25 members

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


A teddy bear that connects two partners in contexts where they don't have access to cell phones.


February 14th, 2018