After my previous project of Opti connect it game me a better understanding of how I can use simple materials like cardboard to create my ideas. Insights on how people interacted with the cardboard prototype helped me get inspiration on how else others can interact with my next project. Previous projects I've analyzed showed me how interaction is the communication/action/influence between two people, systems, objects or entities. Interaction is often how users engage with someone or something to receive feedback, responses, and clear communication. Combining aspects of usability, design, symbolism, and user experience to create a seaming less flow that creates a connection. My project closely resembling a arcade machine has influences of my own ideas. Intended for anyone to be able to have fun from my project and possibly sparking some childhood memories for those people.
The overall concept of our project was to create a game resembling a arcade machine that tested how hard you hit the designated surface. I wanted to create a game that would spark a persons interest to make them want to try it out, also maybe creating some competition between people. We took a lot of inspiration from arcade machines that already exist by analyzing their structure, design, playstyle, and interactivity. The main idea of our game was to throw a ball as hard as you can to get a high score. But ultimately that idea was not the best choice (discussed later in the documentation) so we decided to chance our design. Now the goal of the game is to hit a target three times out of three chances to win the game.
For the structure of our design we wanted to make a rather large life size machine since it would be much harder for people to use a machine smaller than them. Because our game required the user to physically interact with the machine we had to utilize much more durable material in order for the project to last the duration we needed. It made sense to us that we would have to use cardboard because of how cheap and accessible it was to us. But since some cardboard is not the most durable for us to use we had to search for cardboard that was much harder. Metal or wood might of been a better option it is not as easily accessible and it would be hard for use to move our machine around. Therefore, we came to the conclusion that cardboard would suffice for this project.
For the design wise we studied multiple arcade machines similar to our idea, learning from designs aspects like themes, control interfaces, sound system, lighting, instructions and feedback, and display. Since our game revolves around ball throwing we decided to make the design baseball themed and adding decoration that would be seen at a baseball game. Chose the color Inside to be green for the grass and outside the complementary color red to catch a persons attention.
sketched idea:
Pressure Sensor
LED lights x 3
Cardboard
Arduino
Wires
Resistors 220
Copper tape
Electrical tape
Masking tape
Arcade button
Buzzer
Paint
Marker
Fake grass
Hot glue
Foam
Spring
Step 1: code
Before our user testing session we still had our first idea of how hard can you hit the target with the ball. We first to develop the game by focusing on writing the initial code and creating the circuit. Our idea simply put is a pressure sensor senses how hard the ball was thrown by the pressure and lights up a colored LED either green, yellow, or red. Red being a hard throw and green a soft throw. I first connected the pressure sensor and LED lights to the breadboard that connected to the arduino. Using what we've learned previously we decided to use the if, else, else if in our code to determine which LED will light up based on the pressure sensed. If high pressure was sensed the red LED would light up, if medium was sensed the yellow LED light lights up, and if a low pressure was sensed a green LED lights up. So our initial code was:
const int redLED = 9; // Red LED pin
const int yellowLED = 10; // Yellow LED pin
const int greenLED = 11; // Green LED pin
const int pressureSensor = A0;
// Threshold values for pressure levels
const int highPressureThreshold = 400;
const int mediumPressureThreshold = 200;
const int lowPressureThreshold = 80;
void setup() {
// Initialize LED pins as output
pinMode(redLED, OUTPUT);
pinMode(yellowLED, OUTPUT);
pinMode(greenLED, OUTPUT);
Serial.begin(9600);
}
void loop() {
int pressureValue = analogRead(pressureSensor);
Serial.print("Pressure Value: ");
Serial.println(pressureValue);
if (pressureValue >= highPressureThreshold) {
// High pressure: turn on red LED
lightUpLED(redLED);
}
else if (pressureValue >= mediumPressureThreshold) {
// Medium pressure: turn on yellow LED
lightUpLED(yellowLED);
}
else if (pressureValue >= lowPressureThreshold) {
// Low pressure: turn on green LED
lightUpLED(greenLED);
}
delay(10);
}
// Function to light up an LED for 4 seconds
void lightUpLED(int ledPin) {
// Turn on the selected LED
digitalWrite(ledPin, HIGH);
delay(2000);
// Turn off the LED
digitalWrite(ledPin, LOW);
}
Step 2: target
After we have completed our code I worked on creating the target for the player to hit that would light up the LED lights. My concept involves placing a pressure sensor between two cardboard layers, with a protruding section on one piece that acts as a pin. When the ball strikes the front, this pin presses down on the sensor, detecting the force applied. I chose to use two rather hard pieces of cardboard thinking it would receive the hit better . I then placed four springs on each corner between the cardboard so when hit the cardboard will sink into the sensor.
obstacle: My first obstacle I encountered was how small the sensor was compared to the hit area for the player. The force being applied to the sensor was also too quick for the sensor to detect pressure. Hitting around the edges of the cardboard would also result in the sensor not detecting the pressure because it is too weak. I tried to solve this problem by changing the sensor into one that had a larger surface. Then attached sticks like a cross to spread force more evenly and towards the center of the board. After I made this change It was obvious to be working better than before but also very unstable.
Next I made a prototype ball out of a Ping-Pong ball wrapped in tape. I found out if the ball was heavier the target could sense pressure better. I attached the target to the wall because when I hit the target on the table there would be shaking that could have possibly affecting the force being spread out by the shaking. After attaching the target to the wall it did seemed to work better than before so I started to work on the main body of the arcade machine.
Lookback: Looking back I spent way too much time trying to figure out how to fix the sensor leaving me with little time to get all of the parts together. The body and design of the machine was too rushed and could have been improved.
-Attached sensor target to the wall and red,yellow, green LED lights.
Step 3: Body
I started to make the body by cutting the thick cardboard piece I found in the cardboard trolley. But since I did not have enough cardboard at the time I had to make do with thinner and softer cardboard by putting them in layers. Getting the body together was more difficult than I expected and took a lot of time because of how large the pieces had to be, also the cardboard were really heavy because of how thick it was. At first my idea was to also build the bottom of the arcade machine to make it life sized like a real machine, but it was easier to move and play with by just building the top and placing that on a table to get it to the correct height.
-starting to build the body of the machine.
Step 4: reinforcing the prototype for User testing
Once I got the main structure of the arcade machine done I had to figure out where to place the target and had to test to see if it could withstand multiple hard hits. Because the back of the machine was built with soft cardboard it was really affecting the pressure sensor when detecting hits. When compared to how it was reacting when tape to the wall, it was reacting much less. So we decided to lower the pressure threshold of each stage high, medium, or low, which did help the sensor detect pressure a little better than before. I figured rubber is a material that helps absorb pressure really well, I added a layer of rubber to the front of the target and the results were some what better than before.
During user testing our group noticed some main issues that occurred when the testers would play our game
No way to retrieve the ball
Testers don't understand what each colored LED light represents
Rules have to be explained
The button is not noticeable enough for people to know to press it to start
sound is too low
Rubber parts on the target falls off
Sensor is unstable causing the lights to not light up when hit
Overall the interaction and communication between the user is not clear
Getting feedback from the users and professors our group decided to change the concept of our game for a better working interaction. Our new concept is for the player to hit the target three times to light up one LED light each time and they only have three chances. To get a better reaction from our sensor we decided to make a button switch from two copper tapes touching each other to trigger a reaction. This way it would be much easier to sense each hit of the ball. We also changed the LED lights from three different colors to only green because from the testing we noticed people tend to think green means they did something right and red means they missed. In order to get better communication between our machine and the user we decided to create a simple rhythm for whe you lose the game or win. As well as, using a bigger arcade button that lights up, and flashing lights to signal that you've won.
After the User testing session we had to rewrite our code so pressing the button would start the game, hitting the target each time would light up a LED and play a winning sound if you win the game, a distance sensor that detects the ball when it passes by and counting the number of attempts till 3, after 3 tries if all LED lights are not lit then a losing sound will be played, after winning or losing the game will be restarted.
our updated code:
// Pin definitions
const int redLED = 9; // LED 1
const int yellowLED = 10; // LED 2
const int greenLED = 11; // LED 3
const int buttonPin = 7;
const int buzzerPin = 8;
// Distance sensor pins
const int trigPin = 12;
const int echoPin = 13;
const int touchSensorPin = 2; // Pin for the regular button sensor
const int threshold = HIGH;
int hits = 0; // Counter for successful hits
int attempts = 0; // Counter for attempts
bool gameStarted = false; // Game state
int winNotes[] = {262, 330, 392, 440, 392, 330, 262}; // C4, E4, G4, A4, G4, E4, C4
int noteDurations[] = {300, 300, 300, 300, 300, 300, 300};
// Game over melody
int loseNotes[] = {220, 210, 200, 190}; //
int loseDurations[] = {400, 400, 400, 400}; // Durations for each note
unsigned long flashInterval = 200; // Flash interval in milliseconds
unsigned long previousMillis = 0; // Store the last time LEDs were updated
int flashCount = 0; // Count of flashes
bool ledState = LOW; // Current state of LEDs
bool isWinning = false; // Flag to check if winning condition is met
bool isGameOver = false; // Flag to check if game is over
void setup() {
pinMode(redLED, OUTPUT);
pinMode(yellowLED, OUTPUT);
pinMode(greenLED, OUTPUT);
pinMode(buttonPin, INPUT_PULLUP);
pinMode(buzzerPin, OUTPUT);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(touchSensorPin, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
if (digitalRead(buttonPin) == HIGH) {
if (!gameStarted || isGameOver) {
startGame(); // Start or reset the game
}
}
if (gameStarted) {
checkTargets();
trackAttempts(); // Check for attempts made
}
if (isWinning) {
flashWinningLights();
}
delay(50);
}
void startGame() {
gameStarted = true; // Set game state to started
hits = 0;
attempts = 0;
isWinning = false; // Reset winning flag
isGameOver = false; // Reset game over flag
digitalWrite(redLED, LOW);
digitalWrite(yellowLED, LOW);
digitalWrite(greenLED, LOW);
Serial.println("Game is starting...");
tone(buzzerPin, 1000, 500);
delay(400);
noTone(buzzerPin); // Stop the tone
Serial.println("Game Started!");
}
void checkTargets() {
if (digitalRead(touchSensorPin) == HIGH) {
if (hits == 0) {
hits++;
digitalWrite(greenLED, HIGH); // Light up the LED for Target 1
Serial.println("Target 1 hit!");
delay(1);
} else if (hits == 1) {
hits++;
digitalWrite(yellowLED, HIGH); // Light up the LED for Target 2
Serial.println("Target 2 hit!");
delay(1);
} else if (hits == 2) {
hits++;
digitalWrite(redLED, HIGH); // Light up the LED for Target 3
Serial.println("Target 3 hit!");
endGame(); // End the game after the last target
}
}
}
void trackAttempts() {
long duration, distance;
// Clear the trigger
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Set the trigger on
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration / 2) / 29.1;
if (distance < 10) { // If the distance is less than 10 cm
attempts++; // Increment attempts
Serial.print("Attempt: ");
Serial.println(attempts);
delay(3000);
}
if (attempts >= 3 && hits < 3) {
Serial.println("Game Over! You lost.");
playLosingSound(); // Play losing sound
gameStarted = false; // Reset game state
isGameOver = true;
// Reset all LEDs
digitalWrite(redLED, LOW);
digitalWrite(yellowLED, LOW);
digitalWrite(greenLED, LOW);
}
}
void endGame() {
Serial.println("Congratulations! You won!");
isWinning = true;
playWinningSound(); // Play winning sound
}
void flashWinningLights() {
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= flashInterval) {
previousMillis = currentMillis;
// Toggle LED state
ledState = !ledState;
if (ledState) {
digitalWrite(redLED, HIGH);
digitalWrite(yellowLED, HIGH);
digitalWrite(greenLED, HIGH);
} else {
digitalWrite(redLED, LOW);
digitalWrite(yellowLED, LOW);
digitalWrite(greenLED, LOW);
}
// Manage flash count
if (++flashCount >= 10) { // Flash 10 times
digitalWrite(redLED, HIGH);
digitalWrite(yellowLED, HIGH);
digitalWrite(greenLED, HIGH);
// Reset flags
isWinning = false; // Stop flashing
isGameOver = true;
flashCount = 0; // Reset flash count
}
}
}
// winning sound
void playWinningSound() {
for (int i = 0; i < 7; i++) {
tone(buzzerPin, winNotes[i], noteDurations[i]); // Play each note
delay(noteDurations[i]);
noTone(buzzerPin);
delay(50); // Short pause between notes
}
}
// losing sound
void playLosingSound() {
for (int i = 0; i < 4; i++) {
tone(buzzerPin, loseNotes[i], loseDurations[i]); // Play each note
delay(loseDurations[i]);
noTone(buzzerPin);
delay(50); // Short pause between notes
}
}
Step 5: creating a new sensor
To create the button switch sensor I had to go back to the first recitation and reference the paddle switch we did in class. I first cut out two pieces of bardboard in a circle shape then put copper tape on both sides. Then I soldered two long pieces of wire to the copper tape on each side. I attached a piece of foam covered in copper tape to the center, then equally spaced on four sides of the circle to create a distance between the two sides.
The sensor was working, but when hit with a ball the reaction was still unstable. So I peeled off a layer of the cardboard on the top to make the target thinner so it would collapse easier when receiving a hit. In addition to the button switch sensor we decided to use a distance sensor to detect when the ball would be returned. If the ball went through three times without all the LED lights on then that would signal you have lost the game. We attached the distance sensor to the tunnel where the ball would come through after dropping down.
Step 6: Decorations
I started to do decorations by soldering the LED lights onto a longer wire so the lights would be able to reach the control panel.
The circuit was starting to get really messy and hard to work with so I tried to clean up the wires by shortening them:
Next I cut a hole out on the control panel to place the arcade button and printed out baseball themed players to stick onto the back of the machine. The target was placed on the glove of the catcher to signal to users they have to throw the ball at that spot. I then painted the outside and inside of the machine. For better access to the Arduino incase I have to make any changes I created a small trap door under the control panel.
Our final design of the arcade machine:
The goals of my project was to create a game machine that everyone could interact with. My project results were able to show interaction between the user and the machine. Players interacting with physical components of the machine through actions like pressing buttons. Also, the machine communicates back to players through sensory feedback, having the buzzer immediate audio and LED light up as indicators for players. The challenge of the machine makes players more engaged and immersed in the experience. Overall the integration of inputs, feedback, progression encourages players to interact with the machine, creating a communication between the player and machine. Ultimately the audiences reaction to our project were what we planned for, but more changes or additions could be done to even better promote interaction. I would like to have added more symbols or visual aspects to the machine so players would have a easier time understanding. As well as, more stages to the game with each becoming more challenging. I have learned there can be many clever ways to solve a problem and having your prototype tested is always a good opportunity for you to learn about what you can do better. Also, more documentation could be done, collecting photos and videos, will definitely keep in mind for any projects later on. Reflecting on what I have accomplished I have many takeaways from this project. For example, designing a game from my own ideas with multiple interactive components, learned more about the Arduino and how to handle various sensors, being persistent and focusing on detail was a valuable experience.
The project was disassembled and the cardboard was put into the cardboard
trolly for other people to use. All non-recyclable objects were thrown in the
trash. Borrowed parts were also returned.