Week 11 Project Exercises

 

 

 

Exercise 1.1

let port;
let connectBtn;
let baudrate = 9600;
let lastMessage = "";

function setup() {
  createCanvas(400, 400);
  background(220);

  port = createSerial();

  // in setup, we can open ports we have used previously
  // without user interaction

  let usedPorts = usedSerialPorts();
  if (usedPorts.length > 0) {
    port.open(usedPorts[0], baudrate);
  }

  // any other ports can be opened via a dialog after
  // user interaction (see connectBtnClick below)

  connectBtn = createButton("Connect to Arduino");
  connectBtn.position(80, 200);
  connectBtn.mousePressed(connectBtnClick);

}

function draw() {
  background("255");
  

  
  // Read from the serial port. This non-blocking function
  // returns the complete line until the character or ""
  let str = port.readUntil("\n");
  if (str.length > 0) {
    // Complete line received
    // console.log(str);
    lastMessage = str;
    
  
  }
  
      
  
  // Display the most recent message
  text("Last message: " + lastMessage, 10, height - 20);

  // change button label based on connection status
  if (!port.opened()) {
    connectBtn.html("Connect to Arduino");
  } else {
    connectBtn.html("Disconnect");
  }
  
  
  ellipse(lastMessage,10,20,20)
}

function connectBtnClick() {
  if (!port.opened()) {
    port.open("Arduino", baudrate);
  } else {
    port.close();
  }
}

 

Exercise 1.2

let port;
let connectBtn;
let baudrate = 9600;
function setup() {
  createCanvas(255, 285);
  port = createSerial();
  let usedPorts = usedSerialPorts();
  if (usedPorts.length > 0) {
  port.open(usedPorts[0], baudrate);
 } else {
  connectBtn = createButton("Connect to Serial");
  connectBtn.mousePressed(() => port.open(baudrate));
 }
}
function draw() {
  background(225);
  circle(140,mouseY,25,25):
  let sendtoArduino = String(mouseY) + "\n"
  port.write(sendtoArduino);
}

Exercise 1.3

 

 

int led = 5;
void setup() {
  Serial.begin(9600);
}
 
void loop() {
  if (Serial.available()) {
    int ballState = Serial.parseInt(); 
    if (ballState == 1) {
      digitalWrite(led, HIGH); // ball on ground
    } else {
      digitalWrite(led, LOW); // ball in air or default
     }
  }
  // read the input pin:
  int potentiometer = analogRead(A1);                  
  int mappedPotValue = map(potentiometer, 0, 1023, 0, 900); 
  // print the value to the serial port.
  Serial.println(mappedPotValue);                                            
  
  delay(100);
}

 

 

 

 

Preliminary Concept for Final Project

For my Intro to IM Final Project, I wanted to do something that helps me feel so “free” in the sense of creativity: visual arts, together with something I get so excited to experience: music. I’d like to weave both visual arts and music into an interactive art gallery with rooms containing a visual scene with background music. Unlike a traditional art gallery, this art gallery comes with an “escape room” challenge: each art room is a phase of an “escape room” challenge for which users must interact with through musical jamming to reach the next phase (or proceed to the next art room). Once all phases are passed, the user successfully completes the escape room challenge! In this way, users should interact with every artwork in the art gallery if they are to pass this “escape room” challenge.

User decisions can be enabled by analog/digital sensors. For example, users can control an avatar using joysticks to move up, right, left, or down within the escape room setting (eg. a big treehouse). The user should use clues involving the visual artwork and the musical sounds heard from p5js to figure out a solution that involves jamming in a corrected/accepted way to pass the phase and reach the next phase. The jamming could be through a “piano” made with force sensitive resistors (FSR), each connected to a buzzer. The connection of each FSR to a buzzer is crucial as it enables multiple musical notes to be heard at the same time.

The above is the minimum viable product. I was also inspired by the generative text data project from week 4 which involves creating a poem from a corpus of words. If time allows, an additional feature could be incorporated: after the escape room challenge is completed, the user can try to create poem artwork by jamming. Based on the user’s choices, each word of the poem on an artwork are selected and displayed.

Week 11 – Serial Communication

1. Concept

There are 3 parts to the project:

(1) Light Dependent Resistor (LDR) readings are sent from Arduino to p5js. The ellipse in p5js moves on the horizontal axis in the middle of the screen depending on the LDR readings. Nothing on arduino is controlled by p5js.
(2) Control the LED brightness from p5js using mouseX position. The more right the mouse position, the higher the LED brightness.
(3) Taking the gravity wind example (https://editor.p5js.org/aaronsherwood/sketches/I7iQrNCul), every time the ball bounces one led lights up and then turns off, and you can control the wind from the potentiometer (analog sensor).

2. Highlights: Challenges and Overcoming Them

(1) The circle position was not changing in response to the brightness of the surroundings. We attempted to tackle this problem by checking the serial monitor as to whether LDR readings are being read. After confirming the LDR’s functionality, we closed the serial monitor proceeded to use p5js and use the right serial port. However, the circle position was still not changing. With help from Professor, we streamlined our code to include just about all that seemed necessary. This worked!

 

(2) The LED was flickering. We did not know why. Alisa thought that the delay(50) must be at after instead of before analogWrite(ledPin, brightness). However, that did not solve the problem. Samuel thought to remove the delay(50). It still did not work. We decided to try to map the mouseX position (ranging from 0 to 600) to the range of 0 to 255 in Arduino instead of p5js. This worked!

 

(3)

3. Video

Part 1:

Part 2:

Part 3:

4. Reflection and Future Areas of Improvement

Our challenges emphasized the need for understanding the code that allows communication between p5js and Arduino. Without understanding the code, it is difficult to make the right removals or changes necessary to achieve the results we are hoping to.

It would be great to find out why the LED did not flicker when the mapping was performed in Arduino rather than p5js. Is this related to PWM?

Week 11 — Final Project Brainstorming

So for my final project, I initially brainstormed with a classmate to possibly incorporate something that has to do with the arduino wifi board, a sort of multi-player, but tactile game, like Among us. However, I sort of branched out a bit after thinking about it a bit more.

So, I’m planning to build something a little… revealing. Inspired by those classic lie detector tests you see in movies (minus the intense interrogation lol), I want to create a physical system that reacts to some basic physiological signs – specifically, changes in skin conductivity and heart rate.

The core idea is to use copper tape on a surface connecting a circuit when a user’s two fingers touch. When a person places their fingers on the tape, they’ll complete a circuit. Now, the “lie detector” part comes in because, supposedly, when people are stressed or nervous (like when they’re lying!), their palms tend to get a little sweatier. This increased moisture actually makes their skin more conductive, which the arduino can sense as a change in the electrical signal going through the copper tape. I’m not too sure how accurate this might be so I’ll have to test it on a prototype before building it properly.

In addition to that, I want to incorporate a pulse sensor (as recommended by my classmate Ali) to get a reading on the user’s heart rate. This is another classic indicator that can fluctuate under stress.

In terms of the p5, I envision a game or visualization on the screen that reacts to these physiological inputs. The p5 sketch will be listening for data from the arduino about skin conductivity (how “connected” you are to the copper tape) and your pulse. The game aspect is still a bit in development, but I’m thinking of something where your “truthfulness” (based on the sensor readings) influences the outcome. Maybe there’s a visual element that changes based on how conductive your skin is, or a character that reacts to your heart rate. I’m thinking a cheesy romance game or one of those truth or dare type scenarios. I’m not too sure yet. I’m planning to build a prototype to test the sensor readings this weekend.

My goal is to make the interaction engaging and the responses clear and timely. I want the person interacting with it to feel like the system is really “listening” to them, even if it’s just through these simple sensor inputs. Looking forward to diving deeper into this and seeing how it evolves.

Final Project: Preliminary Concept

My final project is an interactive experience that allows users to explore the North Caucasus region (Adyghea, Chechnya, North Ossetia, and Dagestan) as if they are preparing for a journey—whether for university break, a future trip, or just curiosity.

Concept Overview:

The physical part of the project will be a laser-cut/3D printed compass embedded with a potentiometer (or potentially an angle detector) connected to an Arduino. As users physically rotate the compass, it sends data to a P5.js sketch, where the selected region is visually highlighted on a map of the Caucasus.

After selecting a region, users will be presented with a digital menu, which will be the same for each region, with categories like tourist destinations, cuisine, music, what each region is famous for etc. Clicking each category will reveal visuals, audio clips, or text lated to that region and topic.

 

Current Progress:

I’m currently working on designing the digital side of the project in Canva, so i haven’t started writing the code yet. As for the physical part of the project – compass – i’m planning on doing it later as i think it’s better to visualise the layout of my project first.

Week 11: Reading Response

Design Meets Disability

Reading this article made me reconsider how we think about assistive devices. The author argues that the way we design things like hearing aids, prosthetic limbs, or wheelchairs often focuses only on function without paying attention to design or how it makes people feel. He suggests that assistive technologies should be treated the same way we design phones, clothes etc.

One of the examples that stood out to me was how eyeglasses used to be seen as purely medical devices, but now they’re fashion statements. In contrast, hearing aids are still often designed to be hidden, as if there’s something wrong with having them.

He also talks about prosthetics and how some people prefer high-tech or artistic designs over realistic-looking limbs. I really liked the idea that people should have choices between and stylish and not purely functional options too. That feels way more empowering than just trying to hide the fact that someone uses an assistive device.

Personally, this reading made me think about how design can either reinforce stigma or break it. If we design assistive tech as something to be hidden, we’re basically saying that disability is something to be ashamed of. But if we treat it as a space for personal expression, that makes people with disabilities feel more confident.

Week 11: Serial Communication

Task 1

Prompt: Make something that uses only one sensor on Arduino and makes the ellipse in p5 move on the horizontal axis, in the middle of the screen, and nothing on Arduino is controlled by p5.

Code P5:

let circleX;
function setup() {
    createCanvas(600, 600);
    noFill();
}
function draw() {
     background("rgb(248,238,249)");
  stroke("purple");
 ellipse(map(circleX, 0, 1023, 0, width), height / 2, 100, 100);
   
     if (!serialActive) {
    background("#CE41E6");
    stroke("#white");
    textSize(50);
    text("Press Space Bar to select Serial Port", 20, 30, width - 30, 200);
  }
}
function keyPressed() {
    if (key == " ")
        setUpSerial();
}
function readSerial(data) {
    if (data != null) //
        circleX = int(data);
}            
   

Arduino Code:

int lightPin = A0;  

void setup() {
  Serial.begin(9600);       
  pinMode(lightPin, INPUT);  
}

void loop() {
  int sensorValue = analogRead(lightPin);  
  Serial.println(sensorValue);            
  delay(5);                             
}

Task 2

Prompt: Make something that controls the LED brightness from p5

For this project, I decided to imitate the sun: as the mouse moves from left to right across the screen, the brightness level on the screen and the connected LED both increase.

Code P5:

let ledBrightness = 0;

function setup() {
  createCanvas(600, 400);
  textSize(20);
}

function draw() {
  background(240);

  if (!serialActive) {
    fill(0);
    text("Press SPACE to select serial port", 20, 30);
  } else {
    // Display mapped brightness
    fill(0);
    text("LED Brightness: " + ledBrightness, 20, 30);

    fill(255, 150, 0);
    ellipse(mouseX, height / 2, map(ledBrightness, 0, 255, 10, 100));
  }

  // Update brightness based on mouseX
  ledBrightness = int(map(constrain(mouseX, 0, width), 0, width, 0, 255));

  // Send brightness to Arduino
  if (serialActive) {
    writeSerial(ledBrightness + "\n");
  }
}

function keyPressed() {
  if (key == ' ') {
    setUpSerial(); 
  }
}

Arduino Code:

int ledPin = 9; 
void setup() {
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT);

  while (Serial.available() <= 0) {
    delay(300);
  }
}

void loop() {
  while (Serial.available()) {
    int brightness = Serial.parseInt();
    if (Serial.read() == '\n') {
      brightness = constrain(brightness, 0, 255);
      analogWrite(ledPin, brightness);
    }
  }
}

 

Week 11 – Reading Response

My first takeaway is the importance of design for disability support. Prior to the reading, I was not aware that glasses were used as medical prescriptions not long ago (in the 1960s and 1970s), people were stigmatized for the medical model (they were considered to “cause social humiliation”) and that there was a transition to eyeglasses becoming more stylish with new, fashionable glasses. The irony that striking fashion frames are less stigmatizing than pink plastic glasses strikes me. So I thought that what is more visible (such as the striking fashion frame) can be more positively received than what is intended to be visible (pink plastic glasses). But my thought is not fully correct – glasses’ acceptability does not come from directly from its degree of brightness, for its brightness can be to the distaste of certain consumers. Instead of making things more “visible,” I see that the author tries to bring forward the importance of designers in the making of disability support devices. In the design of prosthetic limbs, design engineers are not demanded in a multidisciplinary team of engineers, clinicians, etc. Yet, I see so much potential through the hearing aid designed by Ross LoveGrove for RNID, called The Beauty of Inner Space. Since design can project negative connotation (such as invisibility to project a sense of shame of something to be hidden) or positive connotation, we need designers for people with disabilities to feel more comfortable. With more comfort, it is easier to “wear” than to “use” – also words I took note of with interest – as the former means more closeness to oneself than the latter.

My second takeaway is the importance of design in general, not just for disability. Steve Jobs words about design being not just “what it looks like and feels like” but “how it works” suggest that design is essential, significant and should not be downplayed! It makes sense because of the example of how the design choice of only two options for the iPod shuffle then allows the user to select either playing tracks in the order they were downloaded or in a random order. Two good principles I wish to remember for design in the future are: one, to consider and pursue great cohesion in design between the parts and the whole; two, creating a more accessible design and using simplicity to achieve this.

Week 11: Design Meets Disability Reading Response

One thing I really liked about Design Meets Disability by Graham Pullin is the way it focuses on reframing disability not as a limitation, but as a creative lens through which to innovate design. Rather than treating these assistive technologies like hearing aids or prosthetic limbs as mere medical interventions meant to blend in or be hidden, Pullin instead emphasizes their potential to become expressions of identity, taste, and personal style. The idea that a prosthetic limb could be as much a fashion statement as a handbag or a pair of shoes completely challenges traditional views of medical devices. This shift from invisibility to visibility, where these aids can be beautiful, bold, and integrated into one’s sense of self, was fascinating for me because there’s often a sense of shame associated with these assistive technologies instead that is now being converted into a sense of pride. It reveals how design can be an empowering force when it treats users as people with preferences and personalities, not just as patients.

Overall, I think Pullin’s work makes a very compelling case for bringing designers and disabled individuals into a closer collaboration, arguing that inclusive design should not be about achieving an average but about expanding the range of what’s possible. By introducing examples like sculptural hearing aids or prosthetics designed with aesthetic flair, Pullin invites us to think beyond function and consider meaning, identity, and even fun. It is a very unique take that kind of steps away from more utilitarian design approaches, and it challenged my own assumptions about what disability-related products are supposed to look like. Thus, Design Meets Disability doesn’t just advocate for better products, it advocates for a broader, more human-centered vision of design itself.

Reading Response: Design Meets Disability

The text prompted me to reflect deeply on the role of design in shaping not only products but also perceptions and identities- especially for those of us working in product design. The text challenges the traditional boundaries between medical necessity and mainstream desirability, and as a designer, I find both inspiration and discomfort in this tension.

One point that stands out is the way the Eameses’ leg splint for the U.S. Navy, originally a response to a medical brief, became a catalyst for innovations that transformed mainstream furniture design. The author’s admiration for the leg splint’s “organic form and geometric holes, the combination of subtle surfaces and crisp edges” resonates with me because it exemplifies how constraints can drive creativity. The evidence is clear: the technology and aesthetic language developed for a medical device directly influenced the iconic Eames furniture. This makes me think about how often, in design for disability, we excuse poor design because of the market or the context, rather than holding it to the same standards as mainstream products. It prompts me to question: why shouldn’t design for disability be as beautiful, as considered, and as desirable as anything else?

However, I am uneasy about the persistent bias towards discretion in assistive products. The text critiques the tradition of camouflaging medical devices- pink plastic hearing aids, for instance- in an attempt to make them invisible. The author argues that this approach can inadvertently reinforce the idea that disability is something to be hidden, rather than embraced. The evidence comes from the evolution of eyewear: glasses have transitioned from stigmatized medical appliances to fashion statements, even to the point where people without visual impairments wear them as accessories. This shift did not come from making glasses invisible, but from making them objects of desire. It makes me realise that, as a designer, I should challenge the default of discretion and instead explore how products can project positive identities.

The discussion of fashion’s role in design for disability is particularly provocative. The text points out that fashion and discretion are not true opposites, but there is a creative tension between them. Fashion’s embrace of diversity and its ability to make wearers feel good about themselves stands in stark contrast to the clinical, problem-solving culture that dominates medical design. The evidence is in the HearWear project, where inviting designers from outside the medical field led to radical new concepts for hearing aids- some playful, some overtly technological, and some drawing on jewellery and body adornment. This makes me reflect on my own practice: am I too quick to prioritise technical performance and problem-solving at the expense of self-expression and emotional value?

What I particularly like about the text is its insistence on keeping “the design in design for disability.” The author links the success of products like the iPod to a relentless focus on simplicity and attention to detail, arguing that these same sensibilities are often missing from assistive products because designers are not involved early enough in the process. The point is well made: design is not just about how something looks, but how it works and how it makes people feel. The evidence is in the contrast between the iPod’s iconic simplicity and the “flying submarine” syndrome of overburdened, over-complicated universal designs that try to be everything to everyone and end up pleasing no one. This reminds me that good design often means having the courage to say no to unnecessary features, and instead focusing on the essence of the product and the experience it creates.

Yet, I dislike the way the field of design for disability is still so often siloed and marginalised, both in practice and in perception. The text highlights how multidisciplinary teams developing prosthetics rarely include industrial or fashion designers, let alone sculptors or artists. The result is products that may function well but fail to resonate emotionally or culturally with their users. The evidence comes from the stories of Aimee Mullins and Hugh Herr, who both see their prostheses not just as tools but as extensions of their identity- sometimes even as sources of pride or advantage. This makes me think about the importance of diversity, not only among users but also among designers. We need to bring in more voices, more perspectives, and more creativity if we are to create products that are truly inclusive and empowering.

In conclusion, this text has challenged me to rethink my approach as a designer. It has made me more aware of the cultural and emotional dimensions of product design, especially in the context of disability. I am inspired to seek a healthier balance between problem-solving and playful exploration, between discretion and fashion, and between universality and simplicity. Most of all, I am reminded that design has the power to shape not only products but also identities and societies- and that this responsibility should never be taken lightly.