Assignment 6 – Unusual Switch (Let’s have some tea!)

Concept

I decided to create a switch that would be initiated by two cups touch. I was inspired by the “Emotions & Design: Attractive things work better” reading, as it focused on the affect and the emotional connection to the product. Then I thought of the importance of tea drinking in the Kazakh culture and how there is a clinking glasses ritual that makes you celebrate the moment. I believe that this ‘Cheering’ process is the one that bonds people and creates special atmosphere in the room. So, I wanted to highlight how special this moment is by lightning up the LED when cups touch.

I just attached the foil on two cups and connected it to the wires to the foil and arduino board. I used two LEDs of different colors to portray two different people and their lightning connection.

Coding

Arduino File on Github

void setup() {
  pinMode(11, OUTPUT); // led pin
  pinMode(2, INPUT);  // foil pin
  digitalWrite (2, HIGH);
}

void loop() {
  int cuptouch = digitalRead(2);

  if (cuptouch == LOW) { 
    digitalWrite(11, HIGH); 
  } else {
    digitalWrite(11, LOW);
  }
}

I don’t think there is a particular thing I am proud of about my code because the code is similar to what we did in the class. At first of my setups of the circuit, I forgot to add the digitalWrite function in the code, which made my circuit fail. But then I added it and the cups touching worked as a switch on to the circuit.

Setup

Reflection

I think that I could further work on how the clinking of glasses is portrayed on the breadboard: maybe the LEDs don’t light up immediately, but with a pace, which will remind of growing mood of the person.

I feel like my project could present a great potential to the experience of customers in coffeeshops, where people connect with each other while having cups of coffee. It could bring coffeeshops customers higher level of interaction with the products and a desire to come back to light up another LED with their cups.

This may contain: a white and black coffee cup sitting on top of a table

Also, I would like to work on how aesthetically wire and foil is attached to the cup/glass (again coming back to Don Norman’s work). There are different designs of cupholders, and I think I could make one that would be created from metal or have foil attached more gracefully. Moreover the wire can be connected in a more hidden way and maybe incorporated to the coffeeshop tables, so that cups are kind of wired to the tables, but are still usable.

Week 8 Unusual Switch

Code Link:

https://github.com/lonussss/Intro-to-IM/blob/25ad7a56cd164118742c7f7bec29d9868ff476be/unusual_switch.ino

Concept: 

This idea is distantly inspired by how cars warn you when your seatbelt is not attached. I was inspired by the concept of leds lighting up or not lighting up based on humans interactions with chairs.

How I proceeded was adapting the code and circuit from the in-class example to fit my needs. I replaced the switch with 2 wires attached to 2 pieces of tin-foil, one attached to my chair, and one attached to my shirt.

The LED lights up when i lean back on my chair, and turns off when I’m not leaning back on my chair.

IMG_3267

Code Highlights: 

The code that controls the output pretty much is the same as the in-class exercise, where when the circuit is connected, the led lights up, and when it is closed, the led dims.

int buttonState = digitalRead(A2);

if (buttonState == HIGH) {

digitalWrite(13, HIGH);

} else {

digitalWrite(13, LOW);

 

Improvements: 

Currently, I’m using 2 pieces of tin foil loosely attached to my shirt and to my chair, for the future, something like this could be implemented with a pressure sensor of sorts, where it can determine how much pressure I am applying on the chair, which could affect the brightness of the LED. This would not only be better in terms of not needing conductive material but it also increases functionality.
Continue reading “Week 8 Unusual Switch”

Assignment 8: Wave to Say Hi! (Unusual Switch)

Concept

With the assignment being to create an unusual switch that doesn’t require the use of the hands, I struggled a bit to come up with an idea. After seeing an example in class (the one using foil mustache that completes a circuit when smiling), I wanted to use some kind of an action using the a body part to complete a circuit as well. So I came up with the idea to use the action of waving. When you wave, the forearm and the upper arm usually makes contact, and I used this point of contact as my unusual switch. Hence the name: Wave to Say Hi!

Photos and Videos


 

Code Snippet

void setup() {
  // initialize input and output
  pinMode(12, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(A2, INPUT);
}

void loop() {
  // variale declarations
  int greenLED = 12;
  int redLED = 10;
  int buttonState = digitalRead(A2);

  if (buttonState == HIGH){
    // if waving hi, green light ON, red light OFF
    digitalWrite(greenLED, HIGH);
    digitalWrite(redLED, LOW);
  }
  else {
    // if not waving hi, green light OFF, red light ON
    digitalWrite(greenLED, LOW);
    digitalWrite(redLED, HIGH);
  }
  
}

Circuit Illustration

 

(Circuit illustration done on PowerPoint)

Arduino Setup

(I used the website Tinkercad to make the above Arduino circuit diagram.)

For this project I used two LEDs: red and green. I connected the two LEDs to the pins D10 and D12 respectively, and hence used them as outputs in my code. For the analog input, I had my unusual switch (which would be in place of the push button switch in the diagram) making a connection between 5V and the pin A2.

Code

Github Link

Reflection

I was happy with how I incorporated two outputs into my circuit, but for my input, I’d like to try using a sensor instead of a ‘switch’ in the future.

Reading Reflection 8

Her Code Got Humans on the Moon—And Invented Software Itself

I was previously not aware on who Margaret Hamilton is before reading this article, and I wish I would have known her sooner. Her contribution to the software engineering field, and her role in its development, is very inspiring. When it said that after a late-night party, she rushed back to the lab to correct a code that she realized was flawed, out of fear for the headlines in naming her as the one at fault, I realized the sheer amount of stress and responsibilities that she had, and I truly look up to her dedication and commitment to her work.

This article also highlighted the importance of error handling. When Hamilton told the higher-ups that they should develop the code to prevent the crash, they dismissed her concern and decided not to do anything about it. In the end, the worst case happened. I think the lesson here is valuable to programmers alike: we need to expect the unexpected, prepare for all the possible outcomes, and develop ways to handle all of those outcomes. It might not be possible to always know every possible outcome, but this is exactly why testing is so important: to realize flaws and holes in the program, in the same way Hamilton realized the possibility of the crash because of her daughter.

Emotions & Design: Attractive things work better

Norman’s exploration of the balance between aesthetic and usability and their importance on design is something to think about when thinking of a product. Norman highlights how the aesthetics of a design affects the mood of the user, which in turn affects the usability of it.

This reminds me of how things nowadays are designed with a heavy focus on aesthetics in mind. For example, cute stationaries and journals are popular recently, with ‘back to school haul’ and ‘what’s in my bag’ videos trending on social media. Yes they are cute, but that’s not the only reason why they’re popular. I think that the reason they are so popular is because they’re cute and they’re useful. The aesthetics of the journal inspires the person to continue journaling, the cute notebooks motivates people to make notes, and the same with cute pens and highlighters.

I think that it’s this connection between aesthetics and human emotion that is able to contribute to the overall experience of the design.

Reading Reflection 5

The utilitarian Design vs Aesthetics:

Norman,“Emotion & Design: Attractive things work better”
Her Code Got Humans on the Moon

In reflecting on Don Norman’s “Emotion & Design: Attractive Things Work Better” and the article “Her Code Got Humans on the Moon”, I’ve gained a deeper appreciation for the role of user-centered design, particularly in high-stakes environments. Norman’s insights on emotional engagement in design highlight how well-designed, intuitive products improve user experience, functionality, and even safety. This principle aligns with Margaret Hamilton’s story in the article, where her recommendation to include a warning note in the Apollo software was initially dismissed but could have prevented a critical error that later occurred.

Both Norman and Hamilton emphasize that design must go beyond the technical requirements and account for human unpredictability. In high-stress situations—such as a lunar landing or, more broadly, any critical application—users may act differently than designers anticipate. Hamilton’s experience reflects Norman’s point about designing not only for ideal circumstances but also for scenarios where things go wrong. This reinforces the importance of creating safeguards in design to prevent errors, support users under pressure, and mitigate risks, demonstrating that effective design is as much about empathy and foresight as it is about functionality.

In reflecting on how design impacts safety and usability, an example that comes to mind is the design of fire extinguishers. While essential in emergencies, many fire extinguishers are not immediately intuitive to use, especially in high-stress situations. The sequence—pull the pin, aim the nozzle, squeeze the handle, and sweep—may seem simple, but in a crisis, it can be easy to forget steps or become disoriented, particularly for those who haven’t received training.

Assignment 8: Chopswitch (Unusual Switch)

Concept & Inspiration:

I spent a lot of time trying to come up with a creative switch idea, but nothing was clicking for days. Just today, I was sitting in Marketplace eating a poké bowl while doing some work for my other classes. I was eating it with a pair of wooden chopsticks, and that’s when I realized, I should use chopsticks as my switch. Chopsticks are the one utensil I can always count on, and I’ve used chopsticks to eat a large variety of foods that people wouldn’t usually use chopsticks with, such as hot cheetos so my fingers don’t stain red. I realized I have steel chopsticks in my dorm, so that was a plus because they can act as conductors.

Demo Video:

Chopswitch

Although in my demo I use my hands to turn the LED light on, it’s still possible to turn it on without using hands, as long as the two chopsticks touch each other. You could kick them together with your foot or use your elbow

Github Link:

Chopswitch .ino File

Highlight Code:

if (buttonState == HIGH){
  digitalWrite(13, HIGH); // Turn on light
} else {
  digitalWrite(13, LOW); // Turn off light
}

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.

Reflection + Future Improvements:

I was originally really scared of this assignment given we learned for just two days before already having to create something with Arduino, which was unfamiliar to me. It ended up being rather easy and straightforward, and I would’ve liked to have come up with a more complex and creative concept to execute, since I didn’t plan on having that because I was so scared it would take me a lot of time to understand the assignment and get it to even work. Maybe I could’ve linked a chopstick to a plushy, and have two plushies to make them sword fight with chopsticks. When their “swords” clash, the light would turn on. I think that would’ve been a cool and fun concept, and would’ve matched the “no hands” aspect of the assignment more because it would be easier to kick them.

UNUSUAL SWITCH

CONCEPT:

For my switch, I wanted it to reflect something meaningful from my culture, drawing inspiration from the way men greet each other with a traditional nose-to-nose gesture. This greeting, known as “Al Khushm,” symbolizes respect and warmth, and it felt like the perfect starting point for a unique switch design. I wanted the setup to embody this gesture functionally, so I used two pieces of aluminum foil, each attached to a wire to act as a touch-sensitive switch.

I positioned the foils so that, with a light press—just like the gentle touch in a nose-to-nose greeting—they connect and complete the circuit, turning on the light. I chose aluminum foil for this setup because it’s simple and a good conductor, making it easy to work with for a touch-sensitive design. This material and setup felt like the best way to capture the essence of a traditional greeting functionally. This design doesn’t just represent the gesture; it brings it to life in a modern form which is why i want to create this.

HIGHLIGHT:

The part I’m most proud of is the touch mechanism that simulates the cultural greeting. By setting up the switch with two pieces of aluminum foil and wiring them so that contact turns on the LED, I’ve managed to capture the concept of a traditional greeting in a unique, interactive way.

  // Read the current state of the switchPin
  // LOW means the metal plates are in contact (touch detected)
  int switchState = digitalRead(switchPin);  
  
  // Output the switch state to the Serial Monitor for troubleshooting
  // Prints '0' when plates touch and '1' when they are apart
  Serial.println(switchState);  
  
  // Check if the switch state is LOW (indicating touch/contact)
  if (switchState == LOW) {     
    digitalWrite(ledPin, HIGH); // Turn on the LED when plates touch
  } else {
    digitalWrite(ledPin, LOW);  // Turn off the LED when plates are apart
  }
}

REFLECTION:

One challenge I faced with this setup was keeping the aluminum foil pieces stable. They kept slipping out of place, which made the switch less reliable and the circuit would often disconnect unintentionally. For future improvements, I’d like to find a better way to secure the foil pieces and wires, perhaps by using a more solid base or even switching to conductive tape that can stay in place more effectively. Additionally, adding a way to adjust the pressure sensitivity would make the interaction feel more realistic and closer to the gentle touch of a greeting. These adjustments would help make the switch more durable and improve its functionality, keeping the cultural gesture intact in a smoother way.

UNUSUAL SWITCH:

(i couldn’t find men to do this)

https://github.com/aaa10159/intro-to-IM/blob/3c5cdd3fb62cd513e27758de7d7c168917ccd288/sketch_oct28b.ino

UNUSUAL SWITCH

Concept:

For this project, I decided to create a simple on-and-off switch using aluminum foil, inspired by the idea of a chair pillow switch. Imagine a seat cushion that lights up when you sit on it, that’s the effect I wanted to recreate! I set up two layers of aluminum foil each connected to a different wire with a thin separator (tissue) in between, which makes it act like a “pressure switch.” When you sit down, the pressure causes the foil layers to touch, completing the circuit and turning on an LED. Although it looks like a regular chair pillow, it’s actually just layers of aluminum foil working as a switch.

I based my code on what we learned in class, using the code examples from the PowerPoint as a reference. The code is straightforward: it checks if the foil layers are touching (circuit closed) and turns the LED on or off based on that.

The Code Im most proud of is probably the loop function even though its simple:

const int switchPin = 2;     // Pin connected to the aluminum foil switch
const int ledPin = 13;       // Pin connected to breadboard led

// Setup function runs once when the program starts
void setup() {
  pinMode(switchPin, INPUT);   // Set the switch pin as an input
  pinMode(ledPin, OUTPUT);     // Set the LED pin as an output
}

// Main loop function runs repeatedly
void loop() {
  int switchState = digitalRead(switchPin);   // Read the state of the switch (HIGH or LOW)
  
  if (switchState ==HIGH) {      // If the switch is OPEN - the foils are touching
    digitalWrite(ledPin, HIGH);   // Turn on the LED
  } else {                        // If the switch is closed - the foils are not touching)
    digitalWrite(ledPin, LOW);    // Turn off the LED
  }
}

Reflection:

For improvements, I’d like to experiment with adding a parallel circuit so multiple LEDs light up at the same time or even make them blink, using what we covered in class. I really wanted to use a sensor for the switch but kept it simple this time with just aluminum foil, definitely something to try next time.

Set Up:

https://github.com/nouraalhosani/Intro-to-IM/blob/d62862d42bf6ee36d8aa94884c7f4c3ee04de1c8/1switch.ino

Reading Reflection – Week 8

Her Code Got Humans on the Moon—And Invented Software Itself:

I was truly amazed and in awe at Margaret Hamilton’s journey as an incredibly strong, dedicated, powerful, and influential woman and mother. Women in tech at the time were basically unheard of, and even in today’s world, tech is still a male-dominant field. Yet, it was a woman that made such significant advances to software engineering. Not only was she a working money who would bring her 4-year-old daughter to labs as she worked, she wrote the code for the world’s first portable computer  and eventually became Apollo’s command module computer.

It’s a shame that I’ve never once heard of her before reading this article, especially given how pivotal her work was, that even helped Neil Armstrong land on the moon. Something I found interesting was how Hamilton wanted to add code to prevent the simulation to crash if the program P01 was launched, yet NASA overruled her idea despite the fact that it happened already from Lauren accidentally launching P01. NASA insisted that their astronauts would not make any mistakes because they were “trained to be perfect,” which, evenstill, it doesn’t hurt to play things safe. Just five days into the Apollo 8 flight in 1968, astronaut Jim Lovell accidentally pressed P01 and luckily enough, Hamilton and MIT coders were able to plan and upload new navigational data. It makes me wonder, would NASA have listened to her if she was a man presenting that idea instead?

It shows how important it is to be aware of and know how to navigate potential problems in works, even if you’re confident nothing will happen. Reading this made me a lot more aware and cautious of my future work, and I’ll be on the look out for potential problems that could surface and figure out, even just briefly, how to combat those issues should they arise.

Attractive Things Work Better:

I enjoyed reading Norman’s piece on how aesthetic designs can impact the way we feel towards that product. He makes a really interesting case with his three teapots. He definitely proved his point by showing images of those three teapots and explaining when he would use each one, because the design of the Carelman tea/coffeepot is so incredibly ugly to me that it’s actually frustrating to look at, and I wouldn’t even want that in my house let alone use it. Just its presence would probably ruin the calm and peaceful mood I was probably in if I wanted to make some tea.

The whole concept reminds me of pretty privilege and the saying “look good, feel good.” The concept of object pretty privilege is shown with the teapots, as all of them are functioning teapots at the end of the day, but with very different designs. The concept of the phrase is shown as Norman talks about the concept of positive vs negative “affect.” Positive affect enhances problem-solving and performing tasks while negative affect makes it harder. How we feel about things influences how easy or difficult it would be to think through and finish a task.

Something I found interesting was that negative “affect” didn’t necessarily only have a negative effect on us. Although positive affect helps us creatively think better, negative affect can help us focus and concentrate on potential threats or problems. He even mentions how anxiety also helps us concentrate, as people are less distractible.

I do agree that to an extent, (as long as the product functions decently well) aesthetic designs can make a big influence on the same product depending on the influence of positive of negative affect that stems from it. It could even apply to animals. If you saw a pastel colored mini snake vs a black and yellow colored one, would you take them to be the same level of danger? Well, maybe you would, especially if you have a severe fear of snakes. But, the different looks of the snakes could possibly affect the intensity of negative affect.

A real-life example of attractive things working better could be gardening tools. They still function the same, but certain colors that match your aesthetic or match the aesthetic of your garden might boost positive affect that makes you want to garden more than a basic boring colored tool

Assignment 6 – Traffic Light

Concept

For my project I decided to use toy cars to light up a traffic light. My idea is that when the red car is on the piece of aluminum foil the red light lights up, when the grey light is on the aluminum the yellow light lights up, and when the black car is on the aluminum foil the green light lights up. This is a way to use code to control a traffic light using an unusual switch.

I used the idea that we did in the class for the digital input but instead of the light turning off the light is turning on, and instead of one switch I have three different switches connected to three different lights.

Code I am Proud of

// Control the red LED based on red button state
    if (redButtonState == HIGH) {
        digitalWrite(5, HIGH);   // Turn on red LED
    } else {
        digitalWrite(5, LOW);    // Turn off red LED
    }

    // Control the blue LED based on blue button state
    if (blueButtonState == HIGH) {
        digitalWrite(3, HIGH);   // Turn on blue LED
    } else {
        digitalWrite(3, LOW);    // Turn off blue LED
    }

    // Control the yellow LED based on yellow button state
    if (yellowButtonState == HIGH) {
        digitalWrite(4, HIGH);   // Turn on yellow LED
    } else {
        digitalWrite(4, LOW);    // Turn off yellow LED
    }
}

This code is used for turning on the light when the two pieces of aluminum foil are touching each other.

Setup

I used TinkerCad to develop my Arduino and the placement of the wires and code it to make sure everything is correct.

Code

GitHub

Demonstration