Collaborative Maze by Hansa Mirpuri

Initially, I was having a hard time coming up with an idea for my final project. I wanted to create a fun and interactive game, which is why some of the ideas I initially proposed were renditions of existing games but with a twist to make them more interactive. For example, a hot potato game that limits the time you have to pass an item around, or a maze where two players have to race through an obstacle course without triggering sensors along the way. However, after consulting with LA’s and my Professor, these ideas didn’t seem feasible in the limited time I had to create it. Hence, I continued to brainstorm specifically on the idea of making a maze game more interactive, which is how I ended up thinking of my final idea that challenges two players to work together to move a circle through a maze in Processing. I wanted users to really have to engage with each other during the interaction and that translated to physically relying on each other. This is how I came up with using light sensors attached to wristbands, so that users had to cover each other’s light sensor to get the circle to move. Additionally, I wanted the game to be more physically challenging so that users would really have to physically rely on each other, which is why I decided to make foot pedals because then the two users would have to not only hold each other to cover the light sensors, but also help each other maintain balance when pressing down on the pedals. 

During the user testing session, it was interesting to see how different people interacted with the project. I realized that some participants wouldn’t be comfortable with physical touch, which is why I gave them the option to cover their own light sensor. My concern beforehand was that this would reduce the sense of collaboration, but interestingly it did not have that large of an impact because the players still had to work together to coordinate the movement of the circle. Another issue faced during the session was that the flex sensor in the pedals kept detaching from the cardboard, and this is because the tape I used wasn’t strong enough to hold it in place. Therefore, in order to fix this issue, I used hot glue to stick the sensor into place and that significantly improved the function and aesthetic of the pedals. 

The first thing I came up with for my project was the sensors I was going to use. I believed using the light and flex sensors was the best decision for my project because I used their functions to help me ideate ways I could incorporate them in my project, which is how I ended up creating heart shaped wristbands and pedals.

The next part was drawing the maze and circle in Processing, and creating the arduino code to move the circle only when the light sensor equals to 0, which means its covered, as well as exceeds a specific range on the flex sensor that indicates its bending. The most challenging part was writing the code. LA’s helped to teach me how to use && statements so that I could account for both sensors to dictate the movement of the circle. An issue I was facing at some point was that Processing was not receiving the signals of change in the second set of the light and flex sensor, but an LA pointed out that this was because I had used the code Serial.println();  after each input from the sensors, when it should have only been placed at the end of receiving all the input from the sensors because I was confusing what information got sent from the arduino to Processing. 

 Serial.print(sensor0);

 Serial.print(“,”);  // put comma between sensor values

 Serial.print(sensor1);

 Serial.print(“,”);

 Serial.print(sensor2);

 Serial.print(“,”);  // put comma between sensor values

 Serial.print(sensor3);

 Serial.println();

Another significant issue I faced was coding for the limits of the maze outline. As soon as the circle went outside of the barriers of the maze, I wanted the screen to turn red. My Professor proposed a way to use the pixels to determine the limits of the maze, but I was unfortunately not able to understand how to implement it. Another simpler suggestion was to use if statements so that if the circle went past a certain x and y position of the maze outline, then the screen would turn red. Below is an example of the code:

 if

((x >144) && (y > 430 && y < 500))

{   background(255, 0, 0);   

}

 if

((y < 370) && (x > 80 && x < 180))

{     background(255, 0, 0);   

}

I was able to use this code for vertical lines only, which turned out to still work well. I used water bottles in the pedals because they seemed stable enough to support the weight of a foot, however because there were no springs available, I wasn’t sure how to keep the pedals in place. Therefore, I experimented with folding cardboard to create a spring, which thankfully worked. 

In conclusion, the goal of this project was to render a well-known game to make it more interactive, and I believe that my project was able to achieve this goal. My expectations of my audience’s response was that they would find it as more of a challenging experience and that they would ultimately need to physically rely on each other for balance. Hence, even though this did not occur, the audience still seemed to enjoy playing it and even described it as a workout. Interestingly, after the first round when they are still getting adjusted to the way it works, they started to communicate and direct each other as to when and how to move. This demonstrates another form of working together to get through the maze. My project results align with my definition of interaction which is: Interaction is when one actor’s actions or words can influence and change the behavior of another. In relation to my project, the actions and behavior of the players not only change the position of the circle, but I also believe that their movements and decisions influence each other. 

If I had more time to improve my project, I would have tried to understand my Professor’s suggestion in coding for the limits of the maze as this would enhance the function and experience of the game. Another suggestion was to make the Processing screen bigger so that users can have a better view of the maze. Something I initially wanted to do but did not have time, and was even given as a suggestion, was to add the ability to also move right as well as down. This would make the game more fun and challenging because it would really test the balance of users, especially if two flex sensors were attached to both ends of the pedal. I believe this addition would also have forced users to need to hold each other for balance, which would increase the level of collaboration. Creating this project gave me the chance to revive my ability to be creative in times of setbacks. Creating the entire pedals and springs with scraps of cardboard and plastic bottles is something I would have done when I was younger, and so this was an opportunity to use my imagination again to create things. Something of value I have learnt from my setbacks is that there is always a way to fix things. I felt hopeless when I couldn’t figure out why the code I had was not working, but with help from others, everything always was able to resolve itself. I wanted to create something fun and interactive, and I was able to do this with such a simple idea. This demonstrates that it’s more important to create an experience for users, which doesn’t necessarily call for complicated creations. 

 

Arduino code:

void setup() {
Serial.begin(9600);
// pinMode(6,INPUT);
//pinMode(7, INPUT);
}
void loop() {
// to send values to Processing assign the values you want to send
// this is an example:
int sensor0 = analogRead(A0); // light sensor 1
int sensor1 = analogRead(A1); // flex 1
int sensor2 = analogRead(A2); // light 2
int sensor3 = analogRead(A3); // flex 2
// send the values keeping this format
Serial.print(sensor0);
Serial.print(“,”); // put comma between sensor values
Serial.print(sensor1);
Serial.print(“,”);
Serial.print(sensor2);
Serial.print(“,”); // put comma between sensor values
Serial.print(sensor3);
Serial.println();
// too fast communication might cause some latency in Processing
// this delay resolves the issue
delay(1000);
// end of example sending values
}

 

Processing code: 

import processing.serial.*;

Serial serialPort;

int NUM_OF_VALUES_FROM_ARDUINO = 4;  /* CHANGE THIS ACCORDING TO YOUR PROJECT */

/* This array stores values from Arduino */
int arduino_values[] = new int[NUM_OF_VALUES_FROM_ARDUINO];

float x = 12;
float y = 472;

//Boolean outMaze = false;


void setup() {
  size(500, 500);
  background(255);

  printArray(Serial.list());
  // put the name of the serial port your Arduino is connected
  // to in the line below - this should be the same as you're
  // using in the "Port" menu in the Arduino IDE
  serialPort = new Serial(this, "/dev/cu.usbmodem14301", 9600);
}

void draw() {
  background(255);
  circle(x, y, 20);
  fill(0);
 

  strokeWeight(10);
  line(0, 430, 80, 430);
  line(80, 430, 80, 370);
  line(80, 370, 180, 370);
  line(180, 370, 180, 300);
  line(180, 300, 288, 183);
  line(288, 183, 288, 120);
  line(288, 120, 320, 120);
  line(320, 120, 350, 44);
  line(350, 44, 472, 1);

  line(144, 500, 144, 430);
  line(144, 430, 258, 430);
  line(258, 430, 258, 310);
  line(258, 310, 346, 213);
  line(346, 213, 346, 174);
  line(346, 174, 397, 77);
  line(397, 77, 498, 46);

  //println(mouseX, mouseY);




  // receive the values from Arduino
  getSerialData();



  if ((arduino_values[1] < 60) && (arduino_values[0] == 0)) {
    // move + x value of dot
    x = x + 1;
  }

  if ((arduino_values[3] < 150) && (arduino_values[2] == 0)) {
    y = y - 1;
  }
  circle(x, y, 20);
  
  
 if((x >144) && (y > 430 && y < 500)){
  background(255, 0, 0);
  }
  
  if((y < 370) && (x > 80 && x < 180)){
    background(255, 0, 0);
  }
  
  if((x >258) && (y > 310 && y < 430)){
  background(255, 0, 0);
  }

 if((y < 430) && (x > 0 && x < 80)){
    background(255, 0, 0);
  }
  
  if((x > 258) && (y > 310 && y < 430)){
  background(255, 0, 0);
  }
  
//color c = get(floor(x), floor(y));
//println(red(c));

 //if(red(c) == 255) {
   // background(255, 0, 0);
  
  
}



// use the values like this:
//float x = map(arduino_values[0], 0, 1023, 0, width);
//float y = map(arduino_values[1], 0, 1023, 0, height);

//rectMode(CENTER);
//rect(width/2, height/2, x, y);



// the helper function below receives the values from Arduino
// in the "arduino_values" array from a connected Arduino
// running the "serial_AtoP_arduino" sketch
// (You won't need to change this code.)

void getSerialData() {
  while (serialPort.available() > 0) {
    String in = serialPort.readStringUntil( 10 );  // 10 = '\n'  Linefeed in ASCII
    if (in != null) {
     print("From Arduino: " + in);
      String[] serialInArray = split(trim(in), ",");
      if (serialInArray.length == NUM_OF_VALUES_FROM_ARDUINO) {
        for (int i=0; i<serialInArray.length; i++) {
          arduino_values[i] = int(serialInArray[i]);
        }
      }
    }
  }
}

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);
}

Interaction Lab blog post : Group Research Project

My group’s process:

As a group, we first decided which story we wanted to focus on, and then shared our ideas for an artifact found in that universe. We all agreed to use the excerpt from the novel The Plague by Yan Leisheng, and the artifact we decided to make was a helmet to use as protection from the plague, especially because the protagonist of the book was infected due to a tear in their suit. We created the helmet in a way where the front side is open with a piece of cardboard around the neck to help the helmet stay on one’s head. Initially, we wanted to cover the front side of the helmet and make it interactive in the way that the helmet can be used to signal when one is positive or negative of the Plague. The ideas we came up with to signal this change was to change the color of something on the helmet, such as sliding in different colored paper in the slits on the side, red for positive and black for negative. While trying to think of ideas to interactively show a change in positive and negative, one of us suggested using a long cardboard toilet paper roll and sliding that through the top of the helmet, since there was a lot of space inside the helmet that could be made use of. The roll allowed us to roll it from the outside to change from one side labeled as “positive” and the other as “negative.”

In relation to the research I did on interactive projects, our artifact was able to fit into the criteria of being interactive. My understanding of interaction is that the project should be influenced to change its behavior by external factors, which is what the cardboard roll and AI device (human) attached to it, was able to carry out by detecting and reacting to those that are positive and negative. 

I believe the biggest success of the project was that it had an interactive component. We were able to physically change a component of the helmet with the use of the cardboard roll. Another success of the artifact was the way that it was decorated. We painted it red and black to signify the seriousness of the issue as it was a question of life and death, and hence would allow the artifact to be a reminder for those to take care. A failure of the artifact was how big we made the helmet. This failure was clear during our presentation when the helmet kept being dislocated on Becca’s head. A well functional helmet should be able to securely fit on one’s head, which is something we didn’t achieve and this is because we mainly focused on ensuring that our helmet could cover one’s head to provide protection against external threats. A failure of the performance was that we didn’t show the interactive part of the helmet. When the virus is detected, the AI is supposed to turn the cardboard roll from negative to positive, but this was not done during the performance. 

As a group, we met a total of three times. The first time we met on zoom to discuss which story and what kind of artifact we were going to make. The second time we met in person to create the helmet out of cardboard. The third time we met was to create the storyline and practice acting it out a few times. We also created the tv box during the third time we met because that was when we had the idea of including a newscaster. Some of the things that I suggested was using different colors to signal a change in positive and negative. Another suggestion of mine was to stick the cardboard roll through one side of the helmet because it was long enough to rotate from the outside. I helped to paint the helmet, as well as contributed ideas to the storyline of the performance. I would say everyone contributed equally to thinking up ideas for the artifact and storyline, as well as when creating the artifact and acting out the roles. When we met, it was a comfortable environment to toss ideas around and build up on other people’s ideas. We also had a WeChat group where we coordinated times to meet up. Unfortunately, during one of our meetings, one of our members couldn’t come in person, which was not a problem as we communicated with them through video call and were able to get the job done. 

 

 

Critical analysis of another group:

Another group’s project that I really liked was based on the excerpt from The Veldt by Ray Bradbury. The performance used a virtual reality set to transport someone to a wildlife desert safari for hunting. However, the VR experience took an unexpected turn when what was supposed to be an animal meat market, become a human meat market where animals were buying human parts instead. I believe this groups artifact is very relevant to the fictional story because it reflects the same type of immersive and interactive experience provided by the play room written about in the book. Although virtual reality devices are not necessarily unique, what was unique was the interpretation of the experience of the artifact. Hence, this artifact was able to imaginatively demonstrate the potential problems that could arise from this already existing technology. I really liked the design of the device because it was not too bulky and aesthetically pleasing to look at. The cardboard gun was a good addition to the artifact, to demonstrate it’s functions. The performance was really great because the surprising turn in the storyline was perfectly executed in the performance. 

 

Script of my groups performance: 

[Father watching the news]

Newscaster: Breaking news! Suddenly we have discovered that there is a new virus on the loose. It has been reported that there are 350 cases in the city and is rapidly spreading. Please wear the hazmat suits provided by the government so you don’t get infected by the virus. There have also been reports of these hazmat suits tearing and not protecting people from the virus. So, watch out for your families. 

Father: Oh no, I got to do something about this! [starts to build the helmet]

Mother: Honey, what are you doing? You are making a mess. If you want to do something, go change the light bulbs. 

Father: I am creating a helmet to protect us from the virus.

Mother: It’s not necessary, we have survived for this long, we don’t need extra protection. 

Father: We do, trust me!

Child: Can we see how the helmet looks like?

Father: It’s not finished yet.

Child: Ok we will come back later to see it.

[after a few seconds]

Child: Can we see now, is it ready?

Father: Yes, this is the helmet [holds up helmet]. It comes with an AI device to detect if the people around you are positive or negative, and it will protect you. The design is family friendly!

Child: So is mom going to wear it?

Mother: Oh no!

Child: I don’t want to wear it. 

Father: No, you have to wear it to school. 

Child: They are going to make fun of me.

Father: I don’t care, you have to!

Child [wears helmet and goes to school]

Child: Hi friend!

Friend: Hi, what are you wearing?

Child: I am wearing a helmet that my dad made but I don’t know what it is. I guess it detects the virus. 

Friend: It looks ugly.

Child: Yeah it does but I guess it works. What are you up to today? We are 13 years old so we have classes.

Friend: Yeah.

Child: So do you want to play the hand clap game?

Friend: Sure!

Child and Friend [before Child even touches her friends hands…]

AI device: Beep, Beep, Beep, Warning, Warning!

Child: Oh no, you have the virus.

Friend: What, no I don’t!

Child: Stay away from me! I am going home!

[At home, father watches the news]

Newscaster: Breaking news! A child has just died! So watch out, these suits are not protective and the virus is very deadly.  

Child: Dad, guess what! My friend died today, he had the virus. 

Father: I just saw it on the news!

Child: My helmet worked, it detected it and I ran back home.

Father: Oh, good. See, I told you all!