How often do you contact your parents? Will you sometimes want to express your feelings to your families and friends but just did not actually take action? We found this to be a common problem among people - they wish to feel connected with their family and friends but they are too busy to do so or feel awkward doing so. Sometimes people may be are afraid to disturb others with calls or messages. We aim to create a non-intrusive device that can connect people in a meaningful way.



We found that smiles have magic, they make people feel closer but it also makes us happier in our own day when we smile. We added the "smile" element into our design because we believe a smile is a sign of love and care and people love to share happy moments. Similar to candy, it represents sweet moments and can remind users of happy times they have shared together.

Our concept includes two parts, one is the flex sensor that is put on the user's face, which senses the bending caused by movement of cheek when the user smiles. Another device, the candy ball, is installed in the other user's house. Once a bending is detected, the candy ball will dispense a candy/a few candies. The two users involved will feel connected by sharing happiness and feel excited when discovering the other's live status. (Our flex sensor is a representation of our concept of detecting smiles, other technologies that can detect facial expression such as facial recognition will provide ideal results.)



Sweet Smiles storyboard
Wechatimg136 (2018)


Building Sweet Smiles

We split our work into three parts, the mechanism behind the dispenser, forms of the devices and the code. We started with sketches to find out the most suitable mechanism, and we chose a mechanism works for a servo motor that prevented the candies from jamming. It is connected to a small piece of cardboard that moves down and up as a barrier for the candies. We then brainstormed on the form of the devices. We decided to use a round shape for the candy container to mimic the shape of a human head, hence when the device dispenses candies, it looks like someone hands you candies. 

User Experience & Components

We ideated on the appearance of dispenser further. We thought it was not only a cold device but also an object that stirs the emotional feelings of people when they see it. We chose the patterns that convey our idea of love and art. When people see it, it is an IoT device and is also a piece of art. 



Brach's Conversation Heart Candy
Image uploaded from ios (2018)
Product in bedroom context for reference
Img 20180215 003228497 animation
//#include <Servo.h>
int servoPin = D1;
Servo s1;   //declaration
int servoPos = 0;
// 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 = 10000;
//declare pins for the flex sensor
int flexPin = A0;
void setup()
  pinMode(D1, OUTPUT);
  pinMode(A0, INPUT);
  // attaches the servo on the D0 pin to the servo object
  //enter input output for the flex senspr
  Particle.subscribe("smile/diot/paired/", servoHandler, "3f003d000b47343438323536");
void loop()
  int x = analogRead(A0);
  if (x>= 2700)
 void publishMyEvent()
  //  s1.write(20);
  //  delay(200);
  //  s1.write(50);
  //  delay(500);
   if( lastPublishedAt + publishAfter < millis() )
     String eventName = "smile/diot/paired/" + System.deviceID();
     Particle.publish( eventName, "smile", PUBLIC );
     lastPublishedAt = millis();
void servoHandler (const char *event, const char *data)
  //convert to string
  String eventName = String(event);
  //check if event name contains device id
  String deviceID = System.deviceID();
  //if we get any value other than -1 the event
  //came from this device
  if( eventName.indexOf( deviceID ) != -1 )

Click to Expand

Bill of Materials


  • Flex Sensor x 1
  • Servo Motor x 1
  • Photon x 1
  • Breadboard x 1
  • 10kΩ Resistor x 1
  • Jumper wires x 6

Physical Prototype

  • Foam core
  • Cardboard
  • Printed images
  • Hot glue / gun and Elmer's Glue
  • Polypropylene fluted sheet


We enjoyed the brainstorming process at the beginning because we found out the opportunity gap in the communication issue between people separated by distance from one another. It was hard to start the project at the beginning because the technology we would like to use (muscle sensor or image recognition) was too difficult to implement in such a short period of time with our level of knowledge. After several ideations, we successfully found an alternative to the muscle sensor, flex sensor. We learned that sometimes the concept behind was more important than the form. Our current device is sufficient enough for us to convey the main idea.


  • We learned how to connect two devices - it turned out to be more simple than the team expected.
  • We learned that the only way to know if something will work is by testing it over and over again v. trying everything all at once.
  • We learned to test each individual challenge at once (segmenting each part of the process) instead of testing multiple things at one time or connecting two pieces of code too early in the process.


    • We faced a big challenge when coding for the pairing process. Both of our devices were able to publish events, but they couldn't subscribe to each other's events. We solved it by adding the specific ID of the paired device. 
    • We had an issue with our devices subscribing to each others events so we specified that the events were public in particle.publish.
    • We had trouble with the dispensing mechanism jamming when candy flowed out of the device. We iterated the design a few times so that this problem was resolved.
    • We didn't find a good way to connect the flex sensor to the face. This meant that we had to hold the sensor to the face which was not a natural way to detect a smile.

    Future Iterations

    • In the future, we'd like to incorporate facial recognition technology (with a camera) so that the sensing process can be more natural.
    • We'd like to explore different forms for our dispenser to see if it can encourage more connection and interaction with users.
    • We thought of exploring ways to make the sensor encourage fun and play with the user who's dispensing the candy for the other person. 

    Code Referenced

    • Daragh Byrne - "Template Code for Paired Devices"
    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.




    February 13th, 2018