Final Blog Post :( Final Project Documentation

La Parisserie – A Parisian Croissant Bakery

*credits to my neighbor for the bakery name 🙂

Concept

My final project is a croissant baking game, inspired by the best croissants I’ve ever had during my study abroad semester in Paris last year. The player’s task is to bake the croissant’s in the oven and take them out as soon as they become golden and crispy, avoiding taking them out when they are underbaked or burnt. The player gets to control the oven’s temperature, which is linked to how fast the croissants bake, using a 360º rotating dial. Burning the croissants costs you a life. You get three lives in each round. Once you lose all three lives, you lose the game. The final step is for the player to place the croissants in the correct position on a display tray to get them ready for sale. The player must place the falling croissants as soon as they hit their target spot on the tray. A missed target is a lost life.

Demo of Game

p5 Sketch + Arduino Code

Images of Control Box

Control box set up:

Under the box:

Schematic

Screenshots from the p5 sketch:

Below is the first screen the user sees after the home screen. It provides instructions for the first part of the game: the baking stage.

Below is the second screen in the game. The user must click the button on the control panel to load the croissants into the oven.

During the loading stage, p5 sends a signal to Arduino to turn on the yellow LED light, signaling the preparation stage.

After that, the user controls the speed of the progress bar using the encoder dial. The higher the temperature the faster the bar moves. The user must click the button when the progress bar is in the “Perfect” section to earn full points. Clicking too early makes you lose points, and clicking too late costs you 1 of the 3 lives you get (displayed in the top right corner) and the game takes you back to the screen above to load a new batch of croissants into the oven.

As soon as the player enters the baking stage, and before the progress bar enters the “Perfect” section, p5 send a signal to Arduino to turn on the red LED light, signaling the baking stage.

When the bar enters the “Perfect” zone, p5 send a signal to Arduino to turn on the green LED, indicating the croissants are ready.

If the user perfectly bakes the croissants, the screen below is displayed, giving the user full points and instructions on how to place the croissants for display.

If you underbake the croissants, then you lose 30 points, earning only 70 pts instead of 100. The screen below is displayed informing you of your result and the same instructions above on how to play the second and final stage of the game.

In this stage, you must place 6 croissants in their designated spots on the tray to get them ready for display. The croissant will be falling from the top of the screen, and the user must click the button at the right moment to correctly place the croissants.

Failing to place the croissant correctly costs you a life, and once you lose all 3 lives you have, then the game is over and the game over screen is displayed.

Below is the winning screen.

Description of p5 Code

The code is split across eight JavaScript class files, each responsible for a distinct part of the game.

SerialComm handles all communication between p5.js and the Arduino. Every frame it reads the latest line sent from the Arduino over Web Serial, parses it into an encoder value and a button state, and validates the values before accepting them to filter out any garbage data sent on startup. It also exposes methods for sending single character LED commands back to the Arduino, opening the Chrome port picker, and resetting the encoder counter to zero at the start of each bake.

OvenScene manages everything that happens during the baking phase. It tracks the baking progress, calculates the fill speed based on the encoder value, detects when the golden zone is first reached to trigger the green LED, handles the button press result, plays and stops the timer and ding sounds at the right moments, draws the temperature display pill, and animates smoke particles once the croissants start to burn.

ProgressBar is a standalone class that draws the baking bar at the bottom of the oven scene. It divides the bar into three colour coded zones: blue for raw, gold for the perfect window, and red for burnt, and animates the fill colour shifting from cream to red as the croissants get closer to burning.

FallingCroissant represents a single falling croissant during the display phase. It stores the croissant’s position and fall speed, moves it downward by its speed each frame, checks whether it is within the tolerance zone of its target slot, and detects when it has fallen past the bottom of the tray without being placed.

TrayScene manages the full display stage of the game. It maintains an array of six slots and tracks which ones have been filled, spawns a new falling croissant aimed at the current target slot, checks button presses against the zone detection from FallingCroissant, increases the fall speed slightly after each successful placement to make the game progressively harder, and sends green or yellow LED commands to the Arduino in real time depending on whether the croissant is currently over the target zone.

Header draws the score pill and life hearts that sit on top of every game scene. It uses push() and pop() to isolate its drawing state so that text alignment and rect mode settings from other scenes do not bleed into the header display.

GameManager is the main class which controls the flow of the game. It cycles through nine game states: connect, main menu, baking instructions, oven loading, baking, display instructions, display, win, and game over, drawing the correct background image and calling the correct scene method each frame. It also handles score tracking, life management, screen flash effects, and game resets.

Finally, sketch.js declares all global variables, loads every image, font, and sound file in preload(), initializes the GameManager in setup(), delegates all drawing and logic to it in draw(), and handles the two keyboard shortcuts: `F` to toggle fullscreen and `SPACE` to open the Arduino connection dialog.

Description of Arduino Code

For the encoder, instead of checking its value in the main loop like I originally tried to do with a potentiometer, I used hardware interrupts. This means the Arduino immediately runs the read_encoder function the moment either encoder pin changes, without having to wait for the loop to get to it. This was really important because encoders fire very fast and the loop was simply too slow to catch every click reliably. Inside read_encoder, a lookup table of 16 possible pin state combinations is used to figure out which direction the encoder was turned, and a counter variable goes up or down accordingly. The counter is clamped between 0 and 100 so no matter how much the player spins the dial, the value always stays in a range that p5.js can work with. There is also a fast turning detection built in. If two clicks happen within 0.025 seconds of each other, the counter jumps by 3 instead of 1, making the dial feel more responsive when spun quickly.

For the button, the code detects the exact moment it goes from unpressed to pressed rather than reading it continuously, so holding the button down only counts as one press. This was important for the game because a lot of the interactions are time sensitive and a held button registering multiple times would completely break the logic.

Every 50 milliseconds, the Arduino sends a line to p5.js in the format “counter,buttonState” (for example `75,1` means the dial is at 75 and the button was just pressed). On the other side, p5.js sends back a single character (`Y`, `R`, or `G`) and the `setLED` function turns on the matching LED and turns the other two off. The special character `X` resets the counter back to zero, which happens at the start of every new bake so the player always starts from low heat.

Aspects I am Proud of

Considering the simplicity of my game logic, I wanted to focus my attention on the design, aesthetics, and user-friendliness. Since I usually do not get to be really creative for my coding projects in my CS classes, I wanted to take this opportunity to create something visually appealing.

I spent a lot of time with Gemini asking it to generate the images for the game until it generates exactly what I need. When it failed to do so, I used different scraps it generated for me and designed the exact image I had in mind on Canva. I also spent some time on the audio: finding the audios I need, converting them to mp3, and trimming them to my liking.

Additionally, the most time consuming part of this project was ensuring all the elements and text on the p5 sketch were placed exactly where I needed them and relative to the window size. I spent hours fixing different numbers to get everything exactly where I wanted it to be, running the sketch at least 100 times for sure.

Finally, I wanted to ensure I created a great user experience. I know how frustrating it is when you struggle to understand the logic of a game and how it works; therefore, I wanted to use this project as a chance to practice creating clear instructions with visuals on how to play. I tested my work on my sister by giving her no context on how to play and seeing if she can figure it out only by reading the instructions on the sketch, and she did!

Areas for Improvement

Despite being proud of the final product and its aesthetics, I am actually not the happiest with my concept. I wanted to create a more unique project idea, but was having a bit of a brain fog and could not think of anything. I also would have liked to create a better control box to hold my Arduino components, but I had to work with what I could find around me while keeping ease of use in mind.

References

Arduino:

Images:

Week 13 – User Testing

For my user testing, I had my sister test my game. I did not give her instructions beforehand on the way the game works; I wanted to see if she will be able to figure it out just from the instructions on the screen. This allowed me to test whether my game was self-explanatory and intuitive enough to be played without intervention or explanation from the developer (me). Thankfully, she indeed was able to figure out the game through the instructions given on the p5 sketch and successfully played the game.

She did not have any feedback or comments on the game. This made me really proud of the user-friendliness of my game, which is something I was focusing on during my development. I reflected on the readings we did in class regarding self-explanatory user-interfaces that do not require the developer’s input to give the user the best experience, and wanted to ensure I apply these ideas. I would like to say I think I succeeded 🙂 I wish we had the IM showcase or were back on campus so I can test my game on more people and truly see how intuitive my game is.

Week 12 – Final Project Progress

Finalized Concept

For my final project, I’m making a croissant baking game, where the player goes through the actual steps of making a croissant: pouring the ingredients, rolling the dough, folding in the butter layers, shaping, and baking.

Each step is its own phase in the game. For pouring, the player tilts a little physical prop (I’m thinking a cardboard flour bag) over a bowl on screen. For rolling, you move your hand closer or further from a sensor to control how much pressure you’re applying to the dough. For the butter folding, you flip a switch left or right to match a sequence on screen, which is actually the thing that makes croissants flaky in real life, so I thought it was a fun mechanic to recreate. Then there’s a shaping phase with the mouse, and finally a baking phase where you manage the oven temperature with a potentiometer. At the end you get a croissant tier rating.

Arduino

The Arduino handles all physical input for the project. It reads three sensors and sends their data to p5 over serial communication continuously.

The first sensor is a tilt sensor (SW-520D), which is digital and simply reads HIGH when upright and LOW when tilted. This controls the pouring phase: when the player tilts the sensor, the ingredient starts flowing on screen, and when they straighten it, it stops.

The second sensor is an ultrasonic sensor, which measures the distance of the player’s hand in centimeters. This controls the rolling phase. Close distance maps to heavy pressure, far distance maps to light pressure.

The third component is a slide switch, which reads HIGH or LOW depending on its position, and controls the fold direction in the lamination phase.

The fourth component is a potentiometer, which has a numerical value representing the oven temperature.

The Arduino sends all four values as a single comma-separated line formatted as: tilt state, switch state, distance, pot value.

I am thinking of using LED lights when the croissants are baking in the oven. The red LED light turns on while they are baking, and the green LED turns on when they are done.

p5

p5 is the main visual and game logic system. It reads the serial data from the Arduino, parses the three values, and uses them to update the game state in real time.

Each of the five game phases is managed through a state machine, so the sketch knows which phase is active and which interaction to listen for. During the pouring phase, if the tilt value is LOW, an ingredient fills up on screen at a steady rate. During the rolling phase, the distance value gets mapped to a pressure level that flattens the dough visually. During the lamination phase, the switch value is compared against a generated sequence of prompts and scored accordingly. The shaping phase is handled through mouse and keyboard input directly in p5 without needing the serial data. And then, the baking phase needs the pot value reading from Arduino for the oven temperature.

Visually, each phase has its own screen with animations that respond to the physical input. At the end, a results screen shows the breakdown of each phase score and the final croissant tier.

Current Progress

My biggest progress so far has been finalizing the concept because I really struggled with thinking of something personal and fun.

I asked Gemini to create some visuals for my project. I wanted it to have a Parisian/Ratatouille theme.

Using the Stipend

I found the tilt sensor I need to order on Amazon and will be ordering it today. I also need to a buy a better potentiometer to make it easier to control it. I also want to buy some props such a cutting board and a rolling pin to make a more realistic experience.

Week 11 – Serial Communication

Exercise 1

Demo:

Schematic:

Implementation:

  • Arduino
    • I began by setting up a simple circuit with an ultrasonic sensor to control the circle’s position in p5 using my hand’s distance from the sensor.
    • For the code, I used the same distance calculating code I used in one of my previous assignments that used the ultrasonic sensor. The only thing I changed is
      void loop(){
      //...
        Serial.println(mappedDistance);
      //...
      }

      where I used println instead of just print, so that a new line is printed with every write to the serial monitor.

  • p5:
    • I used the same connection logic from the class example using the “click to connect” button. Then, I read from the serial monitor and convert the string it reads into a value. Then, I draw the ellipse and insert the x-value we read from Arduino into its appropriate place in the parameters.

Exercise 2

Demo:

Schematic:

Implementation:

For this exercise, I used a slider on p5 to control the brightness of an LED on my Arduino.

  • Arduino:
    • I started by setting up a simple circuit with one LED light connected to pin 9
    • For the code, it reads the incoming values from p5, then it constrains the incoming value to be between 0-255 to match the values for brightness, and then it analogWrites the value to the LED.
  • p5:
    • I used the createSlider() function to create a simple slider that controls the LED’s brightness. The slider ranges from 0-255 and by default sets to 127, the halfway point.
    • I, again, used the connect button logic to prompt the browser to connect to the Arduino
    • In the draw function, the slider’s value is read. If the port is open and the connection is established with the Arduino, then p5 sends the slider’s value as a string followed by a newline character “\n” so Arduino knows when a full value has arrived. It also displays the “Disconnect” text on the button if the port is open. If the port is closed, it shows “Connect to Arduino” on the button. The current brightness value is also displayed as text on the canvas

Exercise 3

Demo:

Schematic:

Implementation:

  • Arduino
    • For my circuit, I connected a potentiometer and an LED light to pins on the Arduino
    • For the code, it can be divided into two main sections: sending information from the potentiometer to p5 and receiving information from p5 for the LED
      1. Potentiometer:
        • It reads the potentiometer’s value
        • It maps it from 0-1023 to -100-100 and divides my 100.0 to get a float value. This gives us a good range for the wind variable in the p5 sketch (-1 to 1)
        • It prints the mapped value to the serial monitor using println() to send the data to p5
      2. LED:
        • It checks if data has been received and reads it
        • If the data reads ‘H’ for HIGH, then it turns on the LED, else if it’s ‘L’ for LOW then it turns off the LED
  • p5:
    • For the wind, it reads the value through the port from Arduino and just sets the wind’s x value to the pot’s value
    • For the ball, when it hits the bottom of the screen it sends an ‘H’ to Arduino to signal the LED to turn on, and when the ball is in the air it sends an ‘L’ to signal the LED to turn off.

Reflection

Due to the nature of the tasks and their specific requirements, I found it a bit difficult to get creative with my ideas for each exercise; however, they were an excellent way to familiarize myself deeply with serial communication and test my knowledge.

Week 11 – Reading Response

The author claims that the strive toward the “discreetness” of medical devices enforces a stigma around them, sending a message that needing these devices is shameful. However, while the primary purpose of these devices is functional, on a social level, many people of determination who wear them simply want to feel included and navigate the world without drawing unwanted attention. While I certainly do not condone making people of determination feel left out, and I believe that eliminating stigma starts with changing society’s mindset rather than hiding a disability, I am also realistic. It is extremely difficult to change societal behavior and opinions overnight. Therefore, it can be highly beneficial to create devices that are discreet. Providing these options is ultimately about offering choice: it caters to those who prefer not to draw attention to themselves. Realistically, many people face intense social pressure and would rather blend in than stand out. Years down the line, I hope all medical devices can achieve a destigmatized success story like eyewear, where users have the agency to be as bold or as subtle as they wish. In the meantime, however, making discreet devices is not necessarily a negative thing; it is a necessary accommodation for the social realities people currently face.

Week 10 – Musical Instrument

Concept

For this week’s assignment, we decided to create a make-shift piano using the DIY aluminum foil compression button we used in previous assignments. The piano only plays one song; each time you press one of the piano “keys,” the next note in the sequence plays.

For the analog input, we used a potentiometer to control the pitch/frequency of the notes.

Demo:

Implementation:

We created 3 foil switches, taping one side of each switch to GND and the other to a digital pin. Then, we connected the buzzer and potentiometer.

For the code, we used sound files from the same Github repo we used in class. I used the notes for the song “It’s a Small World.”

On every loop iteration, it reads the state of all three buttons and checks if any of them just transitioned from unpressed to pressed, if a button was HIGH last loop and is LOW now, that counts as a single press.

void loop(){
//...

bool justPressed = (state_yellow == LOW && prev_yellow == HIGH) 
                      || (state_blue == LOW && prev_blue == HIGH) 
                      || (state_red == LOW && prev_red == HIGH);

//...
}

When a press is detected, it looks up the current note’s frequency and duration from two parallel arrays, scales the frequency up or down based on the potentiometer reading, plays it through the buzzer, waits for it to finish, then advances to the next note in the melody. The previous button states are saved at the end of every loop so the next iteration can do the same comparison, ensuring each physical press only ever triggers one note no matter how long you hold it down.

Initially, I had the code so that the note plays every time the button is pressed; however, this was causing the entire melody to continuously play as long as the button is pressed. So, we had to come up with a different way to ensure a note is only played when the button changes from unpressed to pressed.

Due to the way the foils are made, it does appear that only one note is playing when the button is pressed. Sometimes when I press the foil button, the foil may touch from one side by accident, or the wires may move which closes and opens the circuit without my intent. Therefore, the device appears to still be playing multiple notes at once but it eventually pauses.

We had to figure out a way to change the pitch of the notes without completely changing what the note was. Since there is a trend among the notes where if you want to move from a note from higher pitch to a lower or vice versa, the note’s pitch value/frequency would need to either be divided by 2 or multiplied by 2.

For example: standard Do sound = C4; a lower pitch would be C3. The difference between the pitch of the two is that C4 is double C3

For that we mapped the potentiometer’s input values (0, 1023) to (50, 200) and divided by 100, this allows us to shift between notes and their pitches smoothly using the potentiometer.

We multiplied this factor to the original note that would have been played and set the tone to include the multiplied value as the frequency in the tone statement.

void loop(){ 
float pitchMultiplier = map(pot_value, 0, 1023, 50, 200) / 100.0;
}

Reflection:

Reflecting on the issue of the foils touching and playing more notes than I want them to, I thought of a way to fix them using cloth pins. I can attach two foils to the inside of the end you use to open the pin, so when you are opening the pin, the foils touch and it counts as a “press.” I imagine this method to function more smoothly than the sponge compression I built for this assignment because the cloth pin is stable and forces the foils away from each other after every press.

Week 10 – Reading Response

I found this week’s readings quite eye-opening. The video at the beginning of the article was accurately how I imagine the “future” of technology: exactly what it is now, but unlocks more gesture possibilities and projects onto anything. This reminds me of a rumored concept for the iPhone 6 that I got quite excited over in 2013, deeming it to be innovative and futuristic.

Video: iPhone 6 concept with Three-Sided Display that Apple will never  build - iPhone Hacks | #1 iPhone, iPad, iOS Blog — WordPress

While I was upset that Apple did not end up releasing this concept as the iPhone 6, this article made me hope they never release such a phone.

I feel like the article made me realize innovation has kind of paused in the last few years. My friends and I often discuss this question of “if we wanted to invent something new, what could we invent?” because we feel like everything we need, that has a realistic solution, has already been invented. However, this article made me think, what if videos and visions like the ones presented in the article are the reason we are unable to think outside of the box and invent new ideas. The vision for the future often consists of simply combining different existing technologies into one, or expanding current technologies, halting the invention of ground-breaking inventions. It almost feels like phones with a touch screen was the last time humanity witnessed a truly impressive and shocking invention.

Week 9 Assignment – Analog Input and Output

Concept

For this week’s assignment, I used an ultrasonic sensor as my analog input source to control the brightness of two LED lights, and then used a slide switch as my digital input source to toggle between the two LED lights.

The ultrasonic sensor works like a sonar and measures distance by emitting high-frequency sound waves and calculating the time it takes for the echo to return. I programmed the device so that as any object gets closer to the sensor, the LED light’s brightness decreases, and as the object moved further, the light’s brightness increases.

The switch is used to toggle between the two LED lights. So, when the switch is in the HIGH state, the sensor controls the red LED light, while the other light is completely off and vice-versa.

Final Design, Demo, and Schematic

Implementation

I began by creating my circuit and connecting everything together:

For the code, I used an online blog post giving a tutorial on using the ultrasonic sensor. I followed the tutorial to get the sensor initially running: sending a wave, receiving it, and converting it into distance.

void loop(){
//sends a 10 microsecond pulse
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  //waits until the echo comes back and measures how long it took
  duration = pulseIn(echoPin, HIGH);

  //Sound travels at 0.034 cm per microsecond
  //Divide by 2 for the go and return trip = 0.017
  distanceCm = 0.017 * duration;

//rest of the code
}

Then I used what we learned in class last week to constrain the distance values. After testing, I found that the closest distance it can detect is ~3cm, and the furthest is ~210cm, so I set these as the constrain values. Then, I mapped them to the values 0-255, representing the brightness of the LED.

The next part was simple. First, I read the state of my slide switch. Then I wrote an if-else statement so when the switch is ON, the red light is controlled by the sensor readings, and when the switch is OFF, the green light is controlled.

void loop(){
//earlier code...

//if the switch is ON
  if (slideSwitchState == HIGH) {
    digitalWrite(greenLED, LOW);      //turn off the green LED
    analogWrite(redLED, brightness);  //control red LED's brightness
  } else {
    digitalWrite(redLED, LOW);          //turn off the red LED
    analogWrite(greenLED, brightness);  //control green LED's brightness
  }

//rest of the code...
}

Initially, I forgot to add the statements turning off the LED light not currently in use. Therefore, when I switched from one light to the other, the previous light remained stuck in the brightness that it was last at before switching control to the other LED. So, if the red light was on, and I switch to the green light, the red light will remain on until I switch back to it and dim it using the sensor until it turns off.

Reflection

I am extremely happy with my work overall. I felt like this project was one of the most that helped me deeply understand how to use Arduino as I felt I was still a little confused on how things connect and work.

For the future, I would like to expand the project by adding more LEDs of each color and aligning them in a straight line. As an object comes closer to the sensor, more LED’s light up, and the further away it is, the less the LED’s light up. So, it would look like a gradually lighting up strip of light.

References

Week 9 – Reading Reflection

Physical Computing’s Greatest Hits (and misses)

This reading made me realize that I have interacted with way more physical computing projects/products in my life than I initially realized. While reading each example the author gives, I began remembering different projects I have experienced or come across. I started reflecting on how these projects might have been implemented and how I can draw inspiration from them to build something new.

The reading mentions the Wii remote, specifically its tilty controlling abilities. This brought back some great memories for me as I grew up playing Wii. It specifically reminded me of Mario Kart, which relies on the tilting sensors of the remote to control the car.

The “multitouch interfaces” example reminded me of an interactive sand experience I saw in the Science Park in Spain.

The projected image on the sand changes based on the height of the sand in a certain area. For instance, if you create a mini sand hill, the projected image on that hill will be an island. In areas with less sand, they will show as surrounding sea water. The design changes as you change the sand. This got me thinking about its implementation. I predict it probably uses sensors from the top, which measure the distance between the sand and the sensor, to determine what should be displayed at that point. If the distance is shorter, then it shows the top of the island, and as the distance gets longer, it displays a transition from the top of the island into the ocean.

Making Interactive Art: Set the Stage, Then Shut Up and Listen

I found that this reading kind of goes hand-in-hand with a previous reading we did in the semester about good design being obvious. To be able to act on this readings advice and allow the users to take full control of their interaction with your work, you must have designed it to be self-explanatory. It would be difficult to throw someone into an interaction with no context on it and controls that are difficult to understand. Therefore, in order to allow people to fully immerse in your experience, as the reading suggests, it is crucial to ensure you have a good design.

Week 8 Assignment- Creative Switch

Concept:

For this week’s assignment, I decided to create a system to help me remember to sit with a straight posture and to avoid slouching. The system works using two sheets of aluminum foil connected to a buzzer. When the aluminum foils are connected (i.e. your back is touching the chair meaning you are sitting up straight), the buzzer is silenced. When the aluminum foils are separated, meaning you are slouching and your back is off the chair, then the buzzer gives tone, reminding you to sit up straight.

Demo + Setup:

 

Implementation:

To create my foil switch, I taped two thin sheets of foil to a dish washing sponge. This works as a compression switch, so when you press the foils together they close the circuit, and when pressure is released, the sponge between them separates the foils and opens the circuit.

I connected one tin foil to digital pin 2, and the other foil to GND. This functions as the switch, so when the foils are touching they close the circuit, and when they are not the circuit is open.

For the buzzer, I connected its -ve leg to GND, and its +ve leg to digital pin 8.

void setup() {
  pinMode(foilPin, INPUT_PULLUP);
}

For the code, I used a new pinMode called INPUT_PULLUP. I found it while I was doing some research about Arduino coding, and essentially it just uses Arduino’s internal pull up resistors so you do not have to add a physical resistor into the circuit. I wanted to test this out to explore a bit with the code.

if (state == HIGH){ //foils not touching (slouching)
    delay(1500); //wait 2 seconds in case person is just moving
    if(digitalRead(foilPin)==HIGH) { //read input again, if person is still slouched
      tone(buzzer, 1000); //tone
    }
  }

I set an if-else statement so when the state of the foil switch is high, meaning the foils are not touching and the circuit is open, the buzzer will wait a few seconds before giving tone to account for when the user might just be adjusting their sitting position. After 2 seconds, there is another check to see if the foils are in fact still not touching, and then the buzzer gives tone. Else, as long as the circuit is closed, and the foils are touching, then there is no tone produced.

Reflection:

Overall, I am quite proud of my project and the usefulness behind its idea. It was also really exciting and fun to work with Arduino and I really enjoyed the concept of physical work combined with coding.

For the future, I would like to have longer wires so that I can set the Arduino and breadboard setup on my table when the foils are taped to my chair. I considered taping the entire setup to the chair, but that would then make it uncomfortable for the person sitting on the chair.

References: