Don’t forget to FOLLOW THROUGH – Hansa – Professor Minsky

For the midterm project, I paired up with a member from the previous research project because I thought that we worked well together. From our previous research project, even though only a small part of the project was interactive, it was highly approved of by the audience during our presentation. Hence, based on that feedback, we tried to make our project be as engaged with the user as possible, which for me, means that the user is at the center and the project is to visibly change in response to changes made by the user. Our project was based on my idea which was inspired by a real issue that I experienced. Hence, I believe this personal connection makes the project unique and gives it significance, especially since after doing research, I realized that a lot of sport beginners also face the issue of not having the muscle memory to follow through with their swings in racket sports. Additionally, doing research helped me realize just how big of an impact not following through has when hitting the ball, which is why this project could potentially have a great positive value in improving the skills of sport players. 

Since we were making rackets for users to swing, we knew that we had to make the wires long enough so that users had enough freedom to move the rackets around freely. Initially, we wanted users to take turns practicing swinging so that we could use an LED light to signal when a user followed through with their swing. But then we thought that if users were to pick up the rackets without any instructions, then they would probably think the project was a game, therefore they would both try to compete by swinging as fast as they can. Hence, we removed the LED light. We used cardboard to make the rackets because it was easily available and could be made sturdy enough to act as a racket. 

The steps we took to create the project was to first create the cardboard rackets. Then we soldered the wires to the tilt switch, taped the tilt switch to the rackets and finally created the circuit with a buzzer on the arduino.  The most challenging part of creating this project was coding for it on the arduino. We connected both rackets to one breadboard because we wanted the points of both players to be counted on the same program. Hence, the coding involved in the project was to count each tilt of the tilt switch as a point, set off the buzzer when the first person got to 10 points, and then restart the game from 0 points. Since both of us have no background in coding, we got help from LA’s to help us figure out the coding part. An issue we were having with in the beginning was that the tilt switch was counting tilts even though we barely moved it. We thought that we could somehow use code to prevent this, but a professor helped to explain how the tilt switch worked and even suggested we try to adjust it at different angles so that the ball inside doesn’t move so easily. This greatly helped improve the function of the rackets in the way that it reduced the chance of the switch itself to mistakenly count points that takes away from the user to have an influence on the points. 

My teammate and I met quite often and were efficient by splitting up the responsibilities. Whenever there was an issue, such as the day before the presentation, our tilt switches were not being recorded on the serial monitor, we talked out possible reasons, then tried her way of fixing it, then my way, which finally helped us to resolve the issue. Even though my way of fixing it did end of resolving the issue, I realized that it was a good idea for both of us to try our own ways because then we eliminated other possible reasons. 

During the user testing, we received a lot of good feedback and it was useful to see how the project would stand when used by others. One of the issues was that the cardboard rackets bent which made them less sturdy and stable. A feedback from a user was to enforce the racket with more cardboard, which is a modification we made after. This made for a more comfortable and realistic experience when using the racket. While watching the rackets be used by other people, it was also interesting to see how many used it very aggressively and fast. This often resulted in the wires connecting the tilt switch to the breadboard to be pulled out of the breadboard. A user suggested creating a cardboard box to hold in the arduino with the wires coming out of the sides of the box and glued to the box so that the arduino is more stable. We did end up creating the box and tying the wires to it, which greatly helped the wires and the arduino stay in place. We also created longer wires between the tilt switch and breadboard because we saw how the shorter wires were limiting the freedom of users to swing the racket, which looked like an uncomfortable experience. During the user testing, the users weren’t able to see the serial monitor, and hence, their scores, which was a fault on our part because the computer wasn’t facing them. So during the presentation, the scores were shown to the participants so that they got feedback of their swings and could know their score. Finally, a fault in our code during the user testing was that the buzzer continued to ring even after reaching 10 points. We were able to stop the buzzer shortly after 10 points, as well as restart the game with the help of an LA because we couldn’t figure out why the buzzer continued to buzz. 

In conclusion, our goal of the project is to help racket sport players remember to follow through with their swings. The project results align with my definition of interaction in the way that it processes and responds to the movement of the user. The way that the audience interacted with the project was as though it was a game, rushing to set off the buzzer first to signify that the won. I believe they had a high level of interaction with the project, however they did not seem to get the point of following through until after it was explained, such as a lot of times they would just swing the racket horizontally, completely missing the full swing gesture. If I had more time, a good suggestion by my professor was to create a short video or sign to show how one is supposed to swing correctly, that could help guide the users. This addition would be great, especially for beginners of racket sports that this project targets as they might not already know how. Something I have learned of value from the setbacks while creating the project was that the issues I thought were big, ultimately just needed a small modification to be fixed. Hence, before making a big deal out of something, it’s important to have a clear head to see and play around with making modifications because a solution will ultimately be found. Something I will take away from this accomplishment is more knowledge of how coding works because while the LA’s and professors helped us with the code, we learned a lot just by them explaining everything they were doing!

 

Full code: 

#include "pitches.h"

int SENSOR_PIN1 = 2;
int SENSOR_PIN2 = 8;
int tiltVal;
int tiltVal2;
int prevTiltVal;
int prevTiltVal2;
int times;
int times2;

int melody[] = {
  NOTE_C4, NOTE_G3, NOTE_G3, NOTE_A3, NOTE_G3, 0, NOTE_B3, NOTE_C4
};

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
  4, 8, 8, 4, 4, 4, 4, 4
};


void setup() {
  Serial.begin(9600);
  pinMode(SENSOR_PIN1, INPUT);
  pinMode(SENSOR_PIN2, INPUT);
}

void loop() {
  // read the state of the sensor
  tiltVal = digitalRead(SENSOR_PIN1);
  tiltVal2 = digitalRead(SENSOR_PIN2);

  // if the value changed, print the new value
  if (tiltVal != prevTiltVal) {
    if (tiltVal == 1) {
      times++;
      Serial.print("Green:");
      Serial.println(times);
    }
  }

  if (tiltVal2 != prevTiltVal2) {
    if (tiltVal2 == 1) {
      times2++;
      Serial.print("Red:");
      Serial.println(times2);
    }
  }

  // compare times and times2 > who reached 10 first
  if (times == 10 || times2 == 10) {

    if (times == 10) {

      // user 1 won
      Serial.println("Yay, Green won");
      times = 0;
      times2 = 0;

    } else if (times2 == 10) {
      Serial.println("Yay, Red won");
      times = 0;
      times2 = 0;
      // user 2 won
    }
  }

  prevTiltVal = tiltVal;
  prevTiltVal2 = tiltVal2;

  delay(10);
}

Leave a Reply

Your email address will not be published. Required fields are marked *