The goal of this project is to both connect people in long distance relationships as well as long distance friendships.

Created: March 6th, 2018

0

Intention

The goal of this project is to connect both friends and people in relationships. The idea stemmed from the button pressed model, but with a little twist of competition. These connected devices can serve to simply let others know that they are thinking of them, just by rotating the objects a certain way, but can also compete to see who can tilt it faster.

0

Context

The connected device that we created has two potential purposes. The initial purpose was to create two objects that would rotate upon the press of a button. When one person would press their button, the two objects would rotate one way. If the other person pressed their button, the objects would rotate in the other direction. After each button that was pressed, there would be a delay, such that one person could not quickly rotate the object to its maximum angle. The idea was that the person who did not press the button would see the object tilt in one direction, symbolizing a button press of their partner or friend. If the person did not notice the tilt, then after a certain amount of time, the same person would be able to press their button again and tilt it even further. Ideally, after a number of presses, the person who was not pressing the button would realize their object was tilting, and then press their button to try to tilt it back.

This connection has two aspects: one is simply the connectedness of seeing each other change the rotation of their object, the second is that it can be used as a game in that if on person tilted the objects enough to its maximum position they would get a point. This gives people options on how they would like to stay connected to either their friends or a partner.

0

Process

We started with completing the button press function and publishing it as an event. We had some trouble publishing the event at first, but we were able to overcome this challenge. Once that was done, a test of the servo motor was completed to make sure it was working. Then we wrote the code for controlling the position of the servo with a press of the button. At this point when the button was pressed, an event was publicly published as well as the angle of the servo was changed by 10 degrees. Each consecutive button push rotated it 10 more degrees. Once they reach a certain angle, after rotating to either 10 degrees or 150 degrees and starting at 80 degrees it would reset to 80 degrees and the process could start again. 

0

Video of working motors

0

Product

Bill of Materials: (for each device)

  1. Particle Photon

  2. 5 Jumper wires

  3. 1 servo motor (with long attachment)

  4. 1 laser cut container for water (display)

  5. 1 stand to hold the servo (made from wood)


0

Code

0
int servoPin = D0;
int servoPos = 80;
int buttonPin = A1;

int buttonState = HIGH;
int previousState = HIGH;

Servo myServo;


void setup() {
  myServo.attach(servoPin);
  myServo.write(servoPos);
  pinMode(buttonPin, INPUT_PULLUP);

  Particle.subscribe("DIOTPLAYER2",oppose);
}
void loop() {
  buttonState = digitalRead(buttonPin);

  if (buttonState == LOW && previousState == HIGH) {
    Particle.publish("DIOTPLAYER1","HIGH");
    if (servoPos > 10) {
      servoPos -= 10;
      myServo.write(servoPos);
      //delay(5000);
  }
    else {
      servoPos=80;
      myServo.write(servoPos);
    }
  }

  previousState = buttonState;

}
void oppose(const char *event, const char *data) {
  if (servoPos < 150 ) {
    servoPos += 10;
    myServo.write(servoPos);
  }
  else {
    servoPos=80;
    myServo.write(servoPos);
  }
}
Click to Expand
0

Final Video

0

Reflection

We were able to follow through with the idea that we had envisioned at the beginning of the project. Although it was done the way we wanted it to be, we still ran into issues along the way. We had to perform some troubleshooting and ultimately overcame the issues presented. We learned how to successfully connect devices such that they are both publishing and subscribing to events. It was really cool to see the progression of the project as we came closer and closer to finishing. I think that we could really enhance the presentation of the final product by spending more time on putting the containers together and filling with water. I think we worked well together as a group and were good at splitting up. 

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.


About

The goal of this project is to both connect people in long distance relationships as well as long distance friendships.