Assignment 7 – Sensors and Push Buttons

Concept

My idea for this project was to come up with something similar to an alarm system. I chose to work with the ultrasonic distance sensor to create an alarm based on proximity. I implement the system using to LED’s where one is for indicating the distance and is the analog control and the other is the alarm indicator, digital control. The latter LED gives a visual feedback of the distance from an oncoming object and acts as an alert. When the object is outside the 40 cm radius of the sensor the LED is completely off indicating no threat but when an object moves into the 40cm radius the LED starts to light gradually depending on the distance from the sensor; when distance is big the LED is dim and when distance continues to be shorter and shorter the LED also gradually increases brightness to alert someone to turn on the alarm.

Sketch/Setup

Code Highlight

void loop() {
  // Distance from sensor
  int distance = getDistance();

  // State of the switch
  alarmEnabled = digitalRead(switchPin) == LOW; 

  // Analog LED brightness based on distance
  int brightness = map(distance, 5, 50, 255, 0); // distances between 5 cm and 50 cm
  brightness = constrain(brightness, 0, 255);     // Limit brightness to range
  analogWrite(analogLedPin, brightness);

  // If alarm is enabled and distance is below threshold, blink alarm LED
  if (alarmEnabled && distance < distanceThreshold) {
    digitalWrite(digitalLedPin, HIGH);
    delay(200);
    digitalWrite(digitalLedPin, LOW);
    delay(200);
  } else {
    digitalWrite(digitalLedPin, LOW); // Keep alarm LED off
  }

  //Debug
  Serial.print("Distance: ");
  Serial.print(distance);
  Serial.print(" cm | Alarm: ");
  Serial.println(alarmEnabled ? "ON" : "OFF");

  delay(100); 
}

The above is the part of my code which I am proud of how I implemented. In the code I use the distance value which is picked from the sensor to control both LEDs. I control the analog LED based on the distance and to do this I limit the LEDs readings to the distance by mapping then to have a gradual increase in brightness I use constrain so that the difference can be visually perceived.

Arduino File on GitHub

Video demonstration

Reflection and Future improvements

Implementing the project was really fun as it gave me a space to actualise my idea of creating an alarm in an interesting way. I am proud of how I implemented the alarm system. However, there is still room for improvement as I would want  the system to have sound which goes off when the alarm is triggered. Overall, I enjoyed executing the project and further understanding Arduino.

Assignment 9: Watch out for cars! (Analog I/O)

Concept

I wanted to do some kind of distance sensor, so I tried to use the ultrasonic sensor, however I didn’t fully understand how it works yet, so I opted to use the photoresistor as my sensor. The reading from the photoresistor will affect the brightness of the yellow LED: the less light there is (the closer the car is tot he sensor), the brighter the yellow LED is, thus lighting up as a warning. As for my switch, I attached one connection to a strip of copper tape and the other to the car: whenever the car is in contact with the copper tape, the red LED lights up.

Photos and Videos

Code Snippet

// constraining and mapping sensor reading to range 0 - 255
sensorVal = constrain(sensorVal, 700, 725);
brightness = map(sensorVal, 725, 700, 0, 255);

This is a snippet of a code that I’m proud of: it’s when I used the map function to convert the sensor readings into analog output values, however I had to use the reverse logic since I want the LED to get brighter when there is low readings from the sensor (inverse relationship).

Circuit Illustration

Arduino Setup

This was made using Tinkercad.

Code

GitHub

Reflection

I want to try to fully understand the Ultrasonic sensor and then using it next time for projects regarding ranges.

Reading Reflection 9

Physical Computing’s Greatest Hits (and Misses)

This reading was very insightful and interesting! I really enjoyed learning about all the different kinds of physical computing and how it has developed. I love the reference to the Scooby-doo painting, I never thought it could be a type of physical computing.

There’s this idea of physical computing being used as a horror factor. In the idea of ‘interactive dolls’, to me, if they move on their own or make a sound of their own, it is slightly disturbing and unsettling to think about. Imagine seeing one move in a dark room and then it making a sound; I’d be very freaked out. But I guess my freaked out reaction is what makes ‘interactive dolls’ thrive in the market; the fact that they can incite such a strong reaction out of someone (though it’s not a positive reaction).

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

Tom Igoe highlights the importance of not interfering with the audience’s experience to an interactive piece. I think that this is a crucial note to consider for artists because the main idea behind an interactive art is to let the audience interact with the piece; it’s part of the art experience. Their confusion, excitement, all these reactions (or the lack thereof) is what makes a piece interactive.

In his words, artists are supposed to ‘listen’ to the audience. This reminds me of the three components to interactivity (according to Chris Crawford): listening, thinking and speaking. In the same way an interactive piece is supposed to listen to the audience’s actions, an artist should listen to the audience’s reaction to their piece; only then will the artist truly see the effect their piece has on the public.

Reading Reflection Week 9

Physical Computing’s Greatest Hits (and misses)

Reflecting on this writing, I am fascinated by how our interaction with technology can be both deeply personal and impersonal. Physical computing projects encourage people to touch, move and react but I question whether the create real human connections or if they are just interesting projects. Projects like the interactive gloves and theremins are playful and creative but does interacting with them leave a lasting experience? Are they just things for quick entertainment or is there something deeper? I was particularly interested by the “remote hugs” which made me think about how technology connects us emotionally even when we are far apart. Despite the effort to create warmth and closeness I still think that it still has a distance and I am not sure if a machine can really replace the feel of a real human connection. This made me wonder if we as humans are losing appreciation for physical presence when depending more on technology.
This reading made me think differently about what technology should achieve. Having always thought technology to be a way of getting things done efficiently, I have got to learn of it as a tool for emotional experiences also. Maybe, if we stopped focusing on the practical uses only we would get to appreciate the side that brings joy.

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

I found the authors advice to “step-back” to be very thought-provoking. The concept of creating something and releasing it without controlling how people experience it is something which I find to be difficult but I guess in the field of interactive art it makes sense. It made me realise that for art to be art it needs to not deliver a clear and defined message but leave space for audience to have their own interpretation.
To me, I perceived that good art should have a purpose and bear a specific idea but this writing opened my eyes. Maybe art is a means of conversation where the artist is more of a facilitator rather than a director. This makes me wonder if over-explaining art pieces limit artists work since this stops the art from becoming fully alive in other peoples minds. I have come to understand that letting the audience interpret the art freely means that each person gets their own unique experience which might not even be what the artist intended. This writing has made me see interactive art as more about curiosity and less about control

 

Week 9: Unusual Guitar Switch 2.0

Concept

Expanding upon the unusual guitar switch I made for last week’s assignment, I decided to introduce a new feature that will detect the distance between the guitar and the edge of the table. I got the idea for this feature from my own carelessness, as I often knock my guitar into my desk on accident. Using input from the ultrasonic sensor in our arduino kit, a red LED light will light up as a warning whenever the body of the guitar gets too close to the edge of the desk.

Setup and Code

Like my previous assignment, I covered my guitar pick with aluminum foil to make it conductive and then taped it to a wire; another wire was attached to a larger sheet of aluminum foil and then the sheet was taped to the bridge of the guitar, allowing the yellow LED to light up when the pick makes contact with any of the guitar strings. On the other half of the breadboard, I installed the red LED bulb and the ultrasonic sensor on the edge facing outward so that it can be positioned on the edge of the desk.

I learned how to make the LED light turn on and off according to ultrasonic sensor input from these posts on the Arduino Forum:

  • https://forum.arduino.cc/t/ultrasonic-sensor-with-led-how-can-i-do-this/920861
  • https://forum.arduino.cc/t/hc-sr04-always-returns-zero/206641

While trying to get the red LED to work properly, I struggled for a good amount of time as the ultrasonic sensor kept retrieving 0 and only 0 as values on the serial monitor. I eventually realized that I, being my careless self, put the wrong number for the sensor’s echo pin in the definition at the start of the code.

Github code link

Demo

Reflection

The biggest challenge for this assignment was learning how to use the ultrasonic sensor, since we did not get to practice with it in class, but thankfully there were a lot of tutorials on the internet. And while it wasn’t particularly complicated, I’m proud of managing to get it working (despite the minor hiccup with the code as a result of my carelessness).

Reading Reflection #6

Physical Computing’s Greatest Hits (and misses)

This article was really fun and reassuring  to read. While listing recurring elements in physical computing projects,  the author stresses that old ideas can always be altered in creative ways and there is no need to actively steer clear of techniques that have been explored before. This was a wake-up call for me, as I have always struggled while trying to come up with ideas that didn’t overlap with those of Intro to IM students in previous semesters. We’re constantly taught and pressured to be different, to make something completely new, but we often forget that innovation isn’t just for the sake of “being different” but also to take existing concepts and technologies and improving upon them to suit new contexts and ideas.

I think the key is to remember that there is a creative side of physical computing that is arguably just as important as important as the technical side; it’s about how you incorporate the same elements into new narratives and fashion them for new purposes. From this point onwards, I will try not to shy away from looking at previous student works for inspiration.

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

Sometimes, artists have the tendency to over-explain their work, feeling the need to defend their work and themselves for validation. However, this mindset can be counterproductive when dealing with interactive art. Interactive pieces are meant to be experienced directly by the audience instead of having your audience be passive onlookers. Instead, you are creating a piece that performs and also lets the audience perform on it; you can guide your audience, but the ultimate goal is to let your audience explore what is possible with your design.

Reading reflection: Intentios

These examples are great. With digital and interactive art becoming more accessible, it’s easy to fall into the trap of relying on technology without fully considering the clarity of the message. This relates to the other reading, which emphasizes that when form becomes overly important, it can overshadow the experience, resulting in a lack of genuine interaction. I believe having a clear intention is essential. These examples work because they are all straightforward, with the philosophy of each piece rooted in interaction. For instance, Christopher Paretti’s SpeedDial is about the relationship between action and reaction to changes in sound. Similarly, other pieces that incorporate sensors, like camera, temperature, and light, prompt the user to make small inputs, which in turn produce subtle outputs. The simplicity of these interactions is very effective.

While I agree with limiting instructions in interactive art, I also think it can constrain the message being conveyed. Interactive art isn’t like a full play or novel, where the audience is guided through an experience that evolves alongside the characters. In those formats, audiences are almost manipulated by the characters’ emotions, similar to directing an actor. However, in a play, actors follow a defined structure, and that structure—together with the performance—conveys the underlying philosophy. Interactive art, on the other hand, is constrained by the duration and setting of the experience, which might require more intricate design to fully express its philosophy.

Assignment 9: Rate Your Mood

Concept & Inspiration:

For this week’s project, we had to find a way to use both an analog and digital method to turn on a led light. I decided to use a button for my digital sensor, and a potentiometer for my analog sensor. My original idea was to use the button to change the colors of the two RBG led lights to represent different emotions and the potentiometer to change how dim or bright that emotion is for the day. For example, yellow being happiness, red being anger, blue being gloomy, purple as spirituality, etc. I tried to follow some tutorials, but it ended up being a bit too complicated, so I stuck to what we knew.

To rate your mood, users can twist the potentiometer to match how good they’re feeling, with the maximum blinking light representing them having a fantastic day. The button is a “feel good button,” meant to help users reduce their stress by fidgeting with a button that turns on with each click. The satisfying sounds may be soothing to some.

Demo Video:

Rate Your Mood

Github Link:

Rate Your Mood .ino File

Highlight Code:

if(buttonState == HIGH){
  digitalWrite(13,HIGH);
} else {
  digitalWrite(13,LOW);
}

The code I used is basically the exact same as the one we worked on in class while learning about digital input/output, except I made it so that the light was originally off and would turn on if the circuit is complete. Meanwhile in class, it was originally on and would turn off if the circuit was complete. This is highlighted because the feel good button is more satisfying when each click turns on the light, rather than turns off the light

Reflection + Future Improvements:

Overall, I’m still satisfied with how this project turned out. I got to use a new item (the RBG led light) and even though I didn’t get to use it the way I wished and planned for, I still got to use it for its automatic blinking that starts when the potentiometer is maximized. I didn’t do any of that with code, which was really cool. In the future, I would really like to expand on and execute the initial idea I had, to make the colors change with the button. In that case, I would also like to find a different way to create a “feel good button” or some other kind of satisfying fidget since the button would have a different purpose

Reading Response 6

Physical Computing’s Greatest hits and misses

“Physical Computing’s Greatest Hits and Misses” dives into the ups and downs of integrating digital technology into physical spaces, and I found myself agreeing with the need to balance innovation with usability. One example that came to mind as a “hit” is the interactive installations in museums, like touch-sensitive displays or motion sensors that respond to visitors. These installations really enhance the experience, letting people interact with exhibits in ways that feel natural and fun. They show how physical computing can deepen engagement and create memorable experiences.

On the other hand, a “miss” for me is voice-activated assistants in public spaces, like Alexa in hotel rooms. While it’s a cool idea, it doesn’t always feel necessary, and privacy concerns can make people uncomfortable. Sometimes, it feels like technology is added just for the sake of being trendy, without actually improving the experience for the user.

Overall, I appreciated how the article doesn’t just celebrate successes but also reflects on what didn’t work, and why. It’s a good reminder for anyone working in this space (including me!) to think carefully about the purpose and impact of our designs. It’s not just about “what’s possible” but about making something genuinely useful or meaningful.

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

In Making Interactive Art: Set the Stage, Then Shut Up and Listen, the author emphasizes the importance of giving users freedom to explore interactive art without over-directing them. Instead of telling people exactly what to do, artists are encouraged to “set the stage” and then let go, allowing the audience to interpret and respond to the work in their own way. I found this approach both challenging and refreshing. The idea of “listening” to users without controlling the experience forces artists to think deeply about how a piece can evoke curiosity and provide a space for discovery.

One part that resonated with me was the focus on creating an environment where users feel empowered to participate. For instance, I’ve noticed that some of the most compelling interactive pieces in galleries are ones that give minimal instructions. People get to be more creative, exploring the piece however they like. These open-ended approaches make each interaction feel personal and unique.

Overall, this article challenges traditional thinking in art and interactivity, making a strong case for why artists should relinquish control and let audiences truly experience the work. As someone working in interactive media, it’s a powerful reminder that art is often most impactful when it becomes a two-way conversation rather than a one-sided display.

Reading Reflection – Week 9

Physical Computing’s Greatest Hits (and misses):

Copying and originality are quite controversial topics when it comes to art, especially AI art. We tend to try to come up with fully new concepts, as some of our ideas might sound a bit too similar to preexisting concepts. This article talks about how it’s okay if your idea isn’t original, because there’s opportunities for you to make it so. The repetitiveness of certain project themes in physical computing can help users, especially those new to physical computing, learn to create variations of works that inspire them. It is a great means to study and learn concepts that are foreign to you, as you can recreate the work and later build onto it and make it more your own.

I like how the author encourages people to keep going through with an idea even though they think it’s not original. As someone who is still a beginner at physical computing, recreating unoriginal work is a great way to gain experience at the methods, while not needing the brain power to come up with something new when I don’t even understand the basics. The list will come in handy to me as gloves, video mirrors, and things you yell at are in my interest. I like how he also mentions the potential drawbacks of a few of the themes, and explains a situations where that could occur.

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

I liked how almost brutal and straight to the point the author is about the concept of only being able to guide the audience through your interactive work and then shutting up and letting them work their way around your piece on their own. He makes a lot of good points about having to let the audience/users think for themselves when it comes to interpreting interactive art, and the acting example was a wonderful way of putting that necessary autonomy into perspective.

“You can suggest intentions, but you can’t give him interpretations. You can give him props to work with, or place them in the way so he’ll discover them. You can suggest actions, but you can’t tell him how to feel about those actions; he will have to find it for himself.”

It actually reminded me of a recent interaction I had with a friend who needed feedback on his Sound Project. It’s a project solely focusing on audio, with no visuals, and I got a bit lost by the middle and he had to explain what was happening for me to get it. Reading this piece reminded me of that because my interpretation of it wasn’t exactly how he wanted it to be, but he couldn’t just force those ideas into my head. Even after his explanation, I still couldn’t hear what he was pointing out, so my interpretation of his project would’ve been great feedback for him, since it would allow him to see from a perspective where he isn’t interpreting his own work. He can work on “setting the stage more” now that he has “shut up and listened.”