Assignment 9 – “Don’t steal my Arduino UNO Part 2”

Concept

For this assignment, I decided to advance my first assignment by using an analog sensor (ultrasonic range finder) to calculate the distance to the object, indicating if it has been moved too far from the sensor.

Technical structure

For the digital switch, I used the one from the last assignment, where the conductive fabric was used to complete the circuit when an object touched the wires. When it happens, the blue LED lights up.

  .  

As I mentioned earlier, for the analog switch, I decided to use the ultrasonic range finder. It turned out that working with this sensor is quite easy; however, while I was testing the sensor, I found that sometimes the waves go through the object (e.g., hands), and the sensor detects dramatic changes in distance, which makes it slightly inaccurate.

The program is constantly checking the distance to the object, and when the distance detected is more than 10 cm, the red LED starts fading.

Code

void loop() {

  digitalWrite(trigPin, LOW);
    delayMicroseconds(2);

    digitalWrite(trigPin, HIGH);  
    delayMicroseconds(10);  

    digitalWrite(trigPin, LOW); 
  duration = pulseIn(echoPin, HIGH);
  distance = (duration*.0343)/2;

  if (distance >= 10){
    analogWrite(led, brightness); // set the brightness of pin 11:
    brightness = brightness + fadeAmount; // change the brightness for next time through the loop:

    // reverse the direction of the fading at the ends of the fade:
    if (brightness <= 0 || brightness >= 255) { 
      fadeAmount = -fadeAmount;
    }

    // wait for 3 milliseconds to see the dimming effect
    delay(3);
  } else {
    analogWrite(led, 0); // turn off the light if the object is within 10 cm distance
  }

  Serial.print("Distance: ");  
    Serial.println(distance);  

    delay(10);
}

In this part of the code, the loop function for the project is described. The first part controls the functionality of the switch, and starting with the if function, the red LED is being controlled. In line 11, the duration is multiplied by 0.343 because the speed of sound in centimeters per microsecond is .0343 c/μS. Then it’s being divided by two because the sound waves travel to the object and back.

Demonstration

Link to the video: Assignment demonstration

Reflection

While working on the assignment, I realized that making a theft detection device is not as simple as it seems to be. The device I created can be easily bypassed by placing another object in front of the sensor. But if the person is not aware of how the system functions, the device can be used successfully. I enjoyed working with a new sensor, and I hope to expand my knowledge of Arduino more.

Sources used:

“Getting Started with the HC-SR04 Ultrasonic sensor”

https://projecthub.arduino.cc/Isaac100/getting-started-with-the-hc-sr04-ultrasonic-sensor-7cabe1

Week 9 – Reading Reflection

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

In this blog post, Tom Igoe talks about shifting the focus on what interactive art should be: instead of a complete piece, a finished artwork, we should approach it as if they were “performances”. His ideas, in my opinion, provide a valuable lesson on the final objective of interactive pieces. Every person might have their own vision and goals for their projects and art pieces, but at least for me, ultimately what I would like to achieve is to create something that people can see and be satisfied with their experience. I do not want to have to be present, or to have to talk to people explaining what they have to do in order to have the experience. In my opinion, that is the essence of interactivity and one of the key components of good design: the user should start, process and finish the experience by themselves.

Physical Computing’s Greatest Hits (and misses)

In this article, Tom Igoe discusses recurring themes in physical computing projects, highlighting popular ideas and their variations. In my opinion, I think that from this article, the author encourages creativity within these themes (physical computing recurring themes), emphasizing that even though certain ideas have been done before, there is room for originality and variation. And I personally want to emphasize this last part. “I don’t want do to that, it’s already done”, this quote resonated especially hard in my head. The reason behind this dates back to my highschool, where during a rough patch in my software development learning process, I struggled to think about projects that could be usable but would also help me learn. In my head, I was constantly repeating these exact words that the author included: “it has been done before, why care?”.

This mindset was what stopped me from improving as a creator and as a programmer. The principal of my highschool came up to me one day, and he clearly told me one example: “I do not want you to invent the wheel, and I do not want you to invent the suitcase. I want you to explore, and maybe you will end up creating the travel luggage”.

This article helped me remember those learnings, and I think the moral of the story is also one of the pillars of creativity: be able to push away your ego and work with things that are created, work on stuff that has been invented and do not shy away from these opportunities, because Rome was not built in one day, and definitely not from scratch.

Week 9 – Digital and Analog Input/Output

Cutie Cat

Cat video

Concept:
Ever since coming to the Abu Dhabi campus with its abundance of cats, I have noticed that some of them close their eyes in a very cute manner when you pet them, so I wanted to simulate this adorable interaction.

As I did not have the resources or knowledge to make an eye-closing movement, I decided to have the cat’s nose become brighter when you pet it. The photoresistor was perfect for this, because during our in class exercise, I noticed that, as move your hand closer to it, the value drops in a predictable manner. Thus, I wrote some code that made the LED increase in brightness when you move your hand closer to the cats head. Since we needed to have a digital input/output as well, I made a blue gemstone for my cat’s collar that is activated by pressing the blue button.

Highlight:
I am quite happy with how this project turned out, especially the cardboard portion. The tool training enabled me to use the Exacto knife, and by cutting out the cat’s nose and putting a few layers of tape over the back of the hole, I was able to conceal the LED while still allowing it to emit a glow. I was also able to create reliable electrical connections (better than the ones for my candle last time) by using a foil + tape technique, where I placed two bits of foil separated by a gap on a piece of tape and used it to secure the wire ends to the cardboard.

Challenges:
I wanted the light to become incrementally brighter as I moved my hand closer to the cat, so I set three brightness values for when sensorValue is above 700, between 400 and 700, and below 400. However, there is an unsolved bug in which this incrementation does not actually reflect the LED’s brightness. The LED only increments between two levels. When sensorValue is below 400, the LED is still the same brightness as for when sensorValue is between 400 – 700.

analogWrite(yellowLED, brightness);  // set the brightness of yellow LED

  if (sensorValue < 400) {
    brightness = 255;
    delay(1);  // incrementation of brightness not working
  }

  if (400 < sensorValue < 700) {
    brightness = 100;
    delay(1);
  }

  if (sensorValue > 700) {
    brightness = 25;
    delay(1);
  }

Reflection and improvement:
If I were to do this homework again, I would like to successfully implement the incrementation above, and maybe program even more segments so that the brightness of the nose increases smoothly as you move your hand towards the cat, as if it is delighted to see you. I think there may be some way to do this using the fade example, but I could not figure out how, as of now.

Update:

After talking to my classmate, I now know how to program the LED to make it smoothly fade brighter as your hand moves closer:

// set the brightness of yellow LED
  analogWrite(yellowLED, brightness);  

  // set brightness equal to max sensorValue minus the currently received sensorValues
  // the less the sensorValue (the closer your hand is), the higher the brightness
  brightness = 870 - sensorValue; 
  Serial.println(brightness);

Week #9: Reading response

Physical Computing’s Greatest Hits (and Misses)

This article by Igoe was pretty easy to read with lots of examples that are very important for the students like us. I believe that I benefited from reading the text because it provides an overview of common themes in physical computing and offers inspiration for individuals interested in exploring this field. It encouraged me as a reader to think creatively about my own works. I especially liked how the author encourages his readers to have originality within common and recurring themes within the field of physical computing.

I think that there is no apparent bias in the article. The author presents the themes and examples objectively, providing a balanced view of each. It also makes me think about the origin of creativity, and how this concept should not be viewed as something that originates from a novel idea. In fact, even in sciences, it is common to have background literature for the “original” study, meaning that every idea is built upon preexisting ideas. Such an approach with a strong foundation is the best place for the development of new ideas.

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

I believe that the best thing about this article is that it encourages artists to think beyond traditional art forms and embrace interactive experiences. I really like how the author understands the importance of the spectatorship notion.  The emphasis on audience engagement and the value of the interpretations from the side of the spectator is definitely something that has been pursued in the field of contemporary performative art. I believe the very core of the spectatorship is the perception of the art piece by the viewer. It is not just about presence, but also it is about active recognition, understanding, and interpretation of the artwork. It of course doesn’t have to be verbalized in any way, it may even not make sense to the viewer, but the feeling that she/he/they would have was what matters.

From the perspective of students and designers, this article provides valuable insights into the approach and mindset required for designing interactive artwork, highlighting the importance of listening to feedback and adapting the artwork based on audience reaction. However, I believe that the author’s bias is towards creating interactive artwork that encourages audience participation and interpretation all the time, which is not an ideal thing to do because in that way such a working process may downplay the role of the artist’s intention. It may even create the potential for misinterpretation or lack of understanding from the audience, which is definitely not the intention of the artist.

 

 

Week 8 : Assignment

 

Arduino Ultrasonic Sensor :

For my assignment  i attempted to use the ultrasonic sensor in my arduino kit accompanied by three 330 ohm resistors, eight jumper wires and three LED’s yellow, green, and red. Each color corresponds/lights up to how far my hand is away from the ultrasonic sensor, yellow being ‘close’ , green being ‘too close’ , and red being ‘the maximum’ distance.

 

For improvements:

I would like to add a buzzer that initiates a buzzing sound according to how close an object is to the ultrasonic sensor.

MAYBE ITS MAYBELLINE

 

For my assignment idea, I really wanted to incorporate makeup because it’s something that I really love and use everyday (especially red lipstick). I know that I am technically using my hands, but I really didn’t want to let go of this idea!

I connected my Arduino to the breadboard, making use of the techniques we used in class and then taped my jumper wires onto my lipstick (not very subtly, if I may add) and used foil  as my “conductor fabric” to get the LED to switch on and off.


 

For next time, I would like to create some sort of holder for the lipstick so I don’t have to physically apply it and also find a way to hide the wires since they are so obvious.

Week 9 | Creative Reading Reflection: Physical Computing’s Greatest Hits and Making Interactive Art: Set the Stage, Then Shut Up and Listen

Creative Reading Reflection – Physical Computing’s Greatest Hits:

The text discusses common themes in physical computing projects, which are interactive projects that involve using technology to create interesting interactions. These themes include making musical instruments that respond to hand movements, designing gloves for music and gesture control, creating interactive floor pads for dancing and games, building projects that mimic hand movements and more. These themes provide a base for learning and experimenting in the field of physical computing which allows students and creators to add their unique ideas and the variety to change. In essence, they serve as starting point for innovative and creative projects in the world of technology and interaction and will help continue to evolve with new ideas and technologies in physical computing.

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

The second text, it elaborates on how creating interactive art is different as it involves you to provide the audience with a clear context of the art and then allow them to engage freely. Instead of ordering a fixed interpretation, interactive art should provide the the audience to listen to your work by taking it in through their senses and let them think about what each part means. Just like a director working with actors, the artist’s role is to create the framework and opportunities for engagement, much like how a director guides actors in a performance. When creating interactive art, don’t view it as a finished painting or sculpture. Instead, think of it as a live performance. The audience plays a crucial role in completing the art through their actions. This approach welcomes participants to contribute their creative ideas and add diversity to the art.

 

 

 

 

 

Nourhane Sekkat’s Week 9 Reading Response

Reflecting on the themes presented in Tom Igoe’s blog post “Physical Computing’s Greatest Hits (and misses)”, I couldn’t help but notice the recurrence of certain project themes within physical computing classes. The observation that certain ideas, while not novel, provide a canvas for originality resonates with the principle that innovation often comes from iteration rather than from invention. This challenges the notion that only entirely new concepts are worthy of pursuit. The notion that projects like musical instruments or interactive gloves are perennial favorites because they engage with deeply human and culturally ingrained activities like music and gesture underpins this idea.

The insight that the value of such projects lies not in their novelty but in the personal touch and the learning process they encapsulate raises questions about the true nature of creativity. Is it the creation of something completely new, or the personal interpretation and adaptation of existing themes? This view aligns with Igoe’s critique of over-simplifying interactions, such as the hand-waving in video mirrors, which, while aesthetically pleasing, offer limited structured interaction.

In his other post, “Making Interactive Art: Set the Stage, Then Shut Up and Listen”, Igoe urges interactive artists to refrain from over-explaining their work, allowing the audience to engage and interpret the art independently. This guidance counters the traditional artistic impulse to control the narrative and suggests a bias towards creating an open-ended dialogue with the audience. It is a call for humility from the artist, to step back and appreciate the autonomy of the audience’s experience. This approach aligns with contemporary participatory art practices, emphasizing the importance of the viewer’s role in creating the artwork’s meaning. It raises the question of how much guidance is optimal in interactive art to provoke engagement without prescribing it.

Additionally, comparing the planning of interactive artwork to directing actors highlights the collaborative nature of interactive experiences. Here, the audience’s role parallels that of an actor bringing their interpretation to a performance, completing the artwork through interaction. This analogy inspires one to think about the balance between the artist’s intention and the participant’s contribution. How does one design interactive systems that are flexible enough to accommodate diverse interactions while still conveying a cohesive theme or message? This perspective can shift one’s belief about the ownership of meaning in art, recognizing the shared creation between artist and audience.

Assignment 9 – Did You Move My Cup?

Concept

I wanted to create a device to detect whether or not a cup was removed from its place. To do this, there is an LDR beneath the cup, and a button that sets the resting value of the LDR when the cup is placed on top. When the cup is removed, the value of the LDR increases and so the red LED turns on to indicate that the cup has been tampered with. A yellow LED turns on to indicate that the resting value of the LDR is being set.

Demonstration

The video demonstrates the above concept.

Code

#include <Arduino.h>

const int redLEDPin = 7;
const int buttonPin = 2;
const int LDRPin = A0;
const int yellowLEDPin = 8;

int restingValue = 0;

void setup() {
  pinMode(redLEDPin, OUTPUT);
  pinMode(yellowLEDPin, OUTPUT);
  pinMode(buttonPin, INPUT);
  pinMode(LDRPin, INPUT); 
  Serial.begin(9600);
  digitalWrite(redLEDPin, HIGH); //initially turn on the red LED
  digitalWrite(yellowLEDPin, LOW); //initially turn off the yellow LED
}

void loop() {
  //read and print the value of the LDR
  int LDRValue = analogRead(LDRPin);
  int buttonValue = digitalRead(buttonPin);

  //round the value to the nearest 100 for more consistent readings
  LDRValue = round(LDRValue / 100) * 100;

  //button is used to reset the resting value of the LDR
  if(buttonValue == HIGH) {
    digitalWrite(yellowLEDPin, HIGH); //to indicate that the button is pressed and the LDR resting value is being reset
    restingValue = LDRValue;
    return;
  }
  digitalWrite(yellowLEDPin, LOW); //turn off the yellow LED

  //for debugging
  Serial.println(LDRValue);


  //turn on the LED if the button is pressed
  if (LDRValue <= restingValue) { 
    digitalWrite(redLEDPin, LOW);
  } else {
    digitalWrite(redLEDPin, HIGH); // ISSUE! TURN ON LED!! CUP IS MISSING!!
  }

}

Technical Structure

This device is an amalgamation of different individual circuits. There is a sub-circuit to take analog input from a momentary switch. There are two LED circuits that take analog input in, so the LEDs only have HIGH and LOW states. There is one analog sensor, which is the LDR, to determine whether or not the cup has been moved.

Reflection

I realize that this device is not very useful if used in the dark. Since it is hard to see if someone messes with someone in the dark by naked eye, this would be a situation where it would be good to use this device. Since it fails in this particular case, I feel that this is a missed opportunity, and so the device isn’t particularly useful in real world applications. To make a device better suited to the task, I could use an infra-red sensor, or an ultrasonic sensor, so that proximity from the cup to the sensor is reached. However, that sensor is prone to being subdued by a replacement object. I am currently thinking about a foolproof device to protect the cup from being tampered with or taken away.

Week 8: Reading Reflection

I have always wondered whether I prefer form or function. To me, one of the most beautiful things in life is something non-functional, like my dad’s broken handheld camera that sits in my room back home. It doesn’t work or anything, but it has a vintage and worn-down look that I find appealing. I have attached a sense of history and personal meaning to it. I often think about my childhood memories and imagine my parents using it to film. As you grow older, it becomes harder to distinguish truth from fiction. However, I do have digitized videos from that camera from before. On the other hand, I’m not sure if I would be happy to have other non-functional items, such as my phone and laptop. I don’t want to deal with going to shady markets to get them fixed, but I also don’t want to pay Apple a lot of money when I can just buy a new laptop. There are so many more examples, and I can never truly establish which one I prefer more because i see it as a spectrum or a venn diagram. Objects inherently don’t have any meaning, we attach it to them, the good design we generally agree upon is also a product of the social and cultural era we live in. What might have been a perfectly fine clay container of the past is replaced by a stainless steel or glass container right now. Sure there are differences, but the aesthetic judgement or value we attach to this product is as I said a product of shifting tastes and consumer markets.

I was surprised by the reading on Margaret Hamilton. Of course, I was amazed by her visionary work in the 60s, but I was also intrigued by how coding was done back in those days. Currently, I’m accustomed to using p5.js and the Arduino IDE, where I can easily write code in English using familiar constructs like if, else if, and for loops. It’s much more understandable and accessible to us now. However, reading about how the most prominent scientists had to work with memory and hardwired code (I didn’t know about punch cards before this), it wasn’t entirely surprising, but it did put into perspective how far we have come in terms of technology and how much more accessible it has become.