Assignment 6 – Unusual Switch

Concept

I carry my mug with morning coffee to every class, and since it is not fully insulated but just spill-proof, I am often anxious about someone hitting it on the table accidentally and spilling the drink on my or someone else’s laptop. In order to prevent such accidents, I came up with a scheme that indicates when my mug is open and when it is closed using two LED – Red lights up when the mug is open and liquid can be spilled from it, and Green lights up when the mug is closed and there is no threat of spillage.

(For safety purposes, I did not pour any liquid into the mug during the demonstration to avoid risk of getting electrocuted)

Highlight of the code

https://github.com/am13870/UnusualSwitch

I have used the Button example of the code from the Basics category in Arduino IDE Application as the basis for my code. Two LED were used in my scheme, so I had to alter the code accordingly, considering that they have different conditions of being turned on and off.

void setup() {
  // initialize the LED pin as an output:
  pinMode(4, OUTPUT); //Red LED
  pinMode(6, OUTPUT); //Green LED

  // initialize the pushbutton pin as an input:
  pinMode(A1, INPUT);
}

void loop() {
  // read the state of the pushbutton value:
  int buttonState = digitalRead(A1);

  // check if the pushbutton is pressed:
  if (buttonState == HIGH) {
    digitalWrite(4, HIGH); //turn Red LED on
    digitalWrite(6, LOW); //turn Green LED off

  } else {
    digitalWrite(4, LOW); //turn Red LED off
    digitalWrite(6, HIGH); //turn Green LED on
  }
}
Demonstration

IMG_8859

Reflection

For future improvements, the scheme can be insulated from water to make sure that no liquid ruins the electrical components or the whole circuit. Furthermore, sensors can be added to make the construction even more safe – for example, when a hand approaches a sensor, Red LED lights up signifying that a potential spilling threat is too close to the mug.

Reading Reflection – Week #8

I was intrigued to revisit Donald Norman’s work after reading the excerpt from The Design of Everyday Things earlier in class. Personally, I find this article more compelling for how it emphasizes the importance of blending usability with attractiveness to create what Norman terms “good design.” Several ideas stood out to me, particularly the argument that design is inherently contextual, relying on the specific person interacting with it at a unique moment and place. Moreover, what influences how a design functions is the individual’s mood, or “affect,” which constantly shifts. I find this concept extremely helpful for designers as it highlights the fluid and responsive nature of truly effective design.

Another eye-opening point was Norman’s suggestion to consider the context of a design based on the overall stress level of the situation where it will be used. The example he gives — struggling to decide whether to push or pull a door due to one’s stress level — felt especially relatable. I agree with Norman’s implication that a good designer anticipates and accommodates the immediate needs of the user in such moments. For me, the article’s key takeaway lies in the concluding section, where Norman redefines beauty in design as something not superficial and “skin deep”, but holistic and comprehensive. It may seem slightly sarcastic at first when he concludes with “attractive things work better,” yet it underscores the essence of good design. Functionality and attractiveness are always in balance, and functional design, in the end, evokes a unique appeal that aligns with its purpose and context, crafted to enhance the user’s experience.

It is interesting to note how Margaret Hamilton’s experience complements Norman’s ideas about design as a process shaped by context, adaptability, and human limitations. Just as Norman emphasizes how design must account for users’ moods and stress levels, Hamilton’s work highlights the need for resilience in coding to accommodate human error. As for me, both illustrate that effective design — whether in physical objects or software — requires a deep awareness of the user’s state and context. Hamilton’s insistence on error-checking, despite opposition, resonates with Norman’s view that design is not just about fulfilling a basic function but about anticipating a range of human interactions, including mistakes.

I also found similarity between Hamilton’s approach to coding as a blend of technical precision and intuition and Norman’s idea of beauty in design as holistic rather than superficial. Just as Norman advocates for designs that appeal and function seamlessly, Hamilton’s coding enabled the Apollo missions to perform flawlessly in unpredictable situations. Her case proves us that true innovation comes from crafting systems that are both effective and resilient, achieving beauty and function through an intuitive understanding of human and technological dynamics, similarly to the ideas developed by D. Norman.

 

Reading Response #: Affect & Behavior & Emotion & The person that got hunman to the moon

Positive affect is critical in accomplishing challenging tasks, highlighting the importance of considering emotions in design. When people are under stress, design functions differently and should adapt to diverse emotional states. This reminds me of our earlier discussions on the adaptability of design, which should accommodate various user groups. Previously, we focused on factors like age, gender, and culture, but reflecting on this, I see how essential it is to consider potential emotional responses & their changes as well.

I also thought of Hamilton’s story in the other article—how might we apply similar design principles in that context? To what extent does a designer or coder’s background shape their work, and how do they balance ‘beauty’ with usability, especially when functionality is crucial to safety? Additionally, how does the visual appeal of a design impact its emotional effect on users?

Returning to Margaret Hamilton’s story, beyond her remarkable achievements in breaking gender barriers in a male-dominated field, her dedication to error handling is very inspiring. Her example speaks to something beyond just design, affect, and beauty. It’s about resilience and the vital role of precision in high-stakes contexts.

Week 8 – Unusual Switch

Concept

My switch was a pretty simple implementation. I was fascinated by the light sensor and I thought I should use it to implement the switch. The idea was simple; turn on the LED when it is dark and off when there is light and using a light sensor was the best choice.

Setup

Code

const int ldrPin = 2;    // Pin connected to the LDR
const int ledPin = 13;   // Pin connected to the LED

void setup() {
  pinMode(ldrPin, INPUT);   // LDR pin as input
  pinMode(ledPin, OUTPUT);  //LED pin as output
}

void loop() {
  int lightStatus = digitalRead(ldrPin); // LDR value

  if (lightStatus == LOW) {
    // It’s dark, turn on the LED
    digitalWrite(ledPin, HIGH);
  } else {
    // It’s bright, turn off the LED
    digitalWrite(ledPin, LOW);
  }
}

My code was simple to implement as I just modified the example given in class. The code takes in the light sensor pin as input and LED pin as output then it reads the value of the light sensor which is dependent on if light is present or not. Depending on the light sensor value the code will turn on or turn off the LED.

Arduino file on GitHub

Sketch

IMG_3439

Reflection and Future improvements

Implementing the Arduino was really fun. I was able to learn more on connecting circuits properly and also using the digital read. I am proud of being able to use the light sensor which was very fascinating and fun to implement. For the future I hope to learn more about the capabilities of Arduino and possibly create a light sensitive switch which will light the LED depending on the amount of light in the room and not just light up and turn off.

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.

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.

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