Interaction Lab | NYUSH’s Quidditch-Jiayi-Eric

  • CONTEXT AND SIGNIFICANCE
    • Our previous group project inspired me that the output of the project can be various but not single. 
    • Our previous group project’s interaction is based on a button and scanners. As you push the button as an input, the scanners will process your body and output a corresponding result to awake you. This idea brings “interaction” closer to my life for its practicality. Then I noticed that there are lots of items that can be regarded as interaction art such as a vending machine.  Interaction is much easier than I thought.
    • I would define “interaction” as a kind of behavior that happens between people and machines that would impact both the people and machine. As for the impact, it can be everything.
    • Our uniqueness is that we bring a virtual game into reality.  What’s more, by adding complexity to the game and score counting, we made this game more competitive.
    • My project is created for anyone who likes games and especially for Harry Potter’s fans. We add a lot of symbols and elements of Harry Potter to make it more verisimilitude. Quidditch itself is the famous game in Harry Potter with lots of fun and attractiveness, which is also a reason why we choose it.

    

  • CONCEPTION AND DESIGN
    • We think they may have 2 choices. First is to push the people and second is to push the ball. Therefore we divided the playground into 2 sides to emphasize there are 2 players and they are in a competition. As for the ball we use a stepper motor to control it so the audience won’t push it by themselves.
    • We used cardboard as the main material and a stepper motor, some plastic and a 3D print product.
    • For the cardboard, they are quite stable and easy to change into different shapes and paints. For the plastic, I used it to create the golden snitch for its lightness. For the 3D print product, I made a supporter for the golden snitch by using this material for its strength and stability. I want to share more about this supporter. At first we tried a iron wire but it is so weak that it can not support the snitch. Then I tried wooden chopsticks, this is much more stable than the iron wire but it’s not stable enough and hard to stick. After asking LAs about my problem she suggested I do this by 3D printing and I did. In the end it came out a stable and easy-sticking supporter and solved the problem.
  • FABRICATION AND PRODUCTION
    • I would say the most significant part to me is coding for the players. I think I spend more than 10 hours on coding and editing the code to meet our needs. When I nearly finished the code and tested the code runs well and added 2 parts of the code together, the whole project didn’t work and I collapsed. I seek help from Fellow Shengli and Professor Andy and they both gave me precious ideas. Shengli corrected the mistakes and tried several other ways to fulfill our need and Andy helped me with adding the preVal into the code.
    • I was the one who worked on coding and circuit and my partner Kelly worked on building the project and decoration. We cooperate really well and we always solve problems together. We communicate a lot about our process and opinions and support each other during making this project.
    • During the user test we found 2 severe problems. One is that snitch is not stable enough and another is that the game is not competitive enough. So we worked hard on these problems. For the supporter we changed into a 3D print one and for the competition we adopted Kevin’s opinion to control the movement of the player by sticking them on the cardboard.  The changes are effective which brought our project into a higher level.
    • Code 1:(for players)
int Pin1 = 7; // blue person
int Pin2 = 8; // red person
int LED_1 = 12;
int LED_2 = 13;
int prevVal1;
int prevVal2;
int val1;
int val2;
int buzzer1 = 9;
int buzzer2 = 9;
int DIR_PIN = 2;
int STEP_PIN = 3;
int EN_PIN = 4;
int state1 = 0;
int state2 = 0;


long startTime;

void setup() {
Serial.begin(9600);
pinMode(Pin1, INPUT); //blue person
pinMode(Pin2, INPUT); //
pinMode(LED_1, OUTPUT);
pinMode(LED_2, OUTPUT);
}

void loop() {
val1 = digitalRead(Pin1); //blue
val2 = digitalRead(Pin2); //red
Serial.print("val 1: ");
Serial.println(val1);

Serial.print("val 2: ");
Serial.println(val2);
delay(100);

if (prevVal1 != val1) {
if (val1 == HIGH) {
digitalWrite(LED_1, HIGH);
state1 = state1 + 1;
tone(buzzer1, 2000);
} else {
digitalWrite(LED_1, LOW);
noTone(buzzer1);
}
}
prevVal1 = val1;
Serial.print("State 1: ");
Serial.println(state1);

if (prevVal2 != val2) {
if (val2 == HIGH) {
digitalWrite(LED_2, HIGH);
state2 = state2 + 1;
tone(buzzer2, 3000);
} else {
digitalWrite(LED_2, LOW);
noTone(buzzer2);
}
}
prevVal2 = val2;
Serial.print("State 2: ");

Serial.println(state2);

if ((state1 > 5) || (state2 > 5)) {
digitalWrite(LED_1, HIGH);
digitalWrite(LED_2, HIGH);
playMelody();

//startTime = millis();
}

// int counter starts counting
// when counter > 3 secondsm turn lights off
// if(startTime > 10000){
// digitalWrite(LED_RED,LOW);
// digitalWrite(LED_YELLOW,LOW);
// }

// Serial.print("startTime: ");

// Serial.println(startTime);
}

void playFreq(double freqHz, int durationMs) {
//Calculate the period in microseconds
int periodMicro = int((1 / freqHz) * 1000000);
int halfPeriod = periodMicro / 2;

//store start time
long startTime = millis();

//(millis() - startTime) is elapsed play time
while ((millis() - startTime) < durationMs) {
digitalWrite(buzzer1, HIGH);
delayMicroseconds(halfPeriod);
digitalWrite(buzzer1, LOW);
delayMicroseconds(halfPeriod);
}
}

void playMelody() {

playFreq(262, 100);
playFreq(294, 100);
playFreq(349, 100);
playFreq(294, 100);
playFreq(440, 200);
delay(100);
playFreq(440, 400);
playFreq(392, 400);
delay(300);
playFreq(262, 100);
playFreq(294, 100);
playFreq(349, 100);
playFreq(294, 100);
playFreq(392, 200);
delay(100);
playFreq(392, 400);
playFreq(349, 400);

}
  • Code 2:(for stepper motor)

#include <AccelStepper.h>

int DIR_PIN = 2;
int STEP_PIN = 3;
int EN_PIN = 4;

// Define a stepper and the pins it will use
// AccelStepper::DRIVER means a stepper driver (with step and direction pins)
AccelStepper stepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);

void setup() {
// Enable the stepper driver by setting the
// EN pin to LOW
pinMode(EN_PIN, OUTPUT);
digitalWrite(EN_PIN, LOW);
// The run() function will accelerate up to
// the speed set here
stepper.setMaxSpeed(1000);
// Set the desired constant speed for use with
// runSpeed()
stepper.setSpeed(1000);
 }

void loop() {

stepper.runToNewPosition(400);

stepper.runToNewPosition(0);

*The stepper motor part was adapted from recitation 4:

https://docs.google.com/document/d/1MEgxjFO1iaVlIwwEjccmbOkdaQapE4WuOntilAkYfJA/edit

  • CONCLUSIONS
    • Our goal is to make a Quidditch game to allow people to catch the ball to win the game. From my perspective we achieved the goal of making an interaction installation. People control the players to catch the ball, if they catch, the buzzer will sound and the LED will light up. There are behaviors and impacts in this process. Moreover, people’s actions are input, circuit and coding served as processing parts and buzzers and LEDs are out. In a word, the project satisfied the elements of interaction art.
    • Our audiences interact correctly with the project. Each audience controlled a player and tried to catch the snitch.
    • If we have more time I want to improve the sensitivity between the snitch and the player. Also I want to make the snitch circling randomly. In addition I want to cover all the wires by adding another tier.
    • I have experienced and learned a lot during this whole project. The project is hard work for me since I am not familiar with the code. However I gained much assistance from professors, fellows and LAs. Amelia helped me with drawing the circuit of our player control system and taught me how to build a 3D model, Kevin gave us most useful advice during the user test and helped me with the 3D printing, Shengli helped me with coding and correct all the mistakes I have made which cost her whole afternoon, Anya and Rachel helped me with code checking and project building work in the last few minutes before the presentation, professor Andy gave me advice on using preVal code and professor Gottfried found my problem of missing a pull-down resistor. The whole process is exhausting but I am more than satisfied to acknowledge so many amazing people and our project won’t be made without their help. I think they are also part of our project.
    • The final video

<iframe src=”https://drive.google.com/file/d/1d6bP2GkLca2WSCX8WfOlv3GSg9xZOpPA/preview” width=”640″ height=”480″ allow=”autoplay”></iframe>

 

Leave a Reply