Final Project Idea

Sometimes, all we need is a long hug to help us recover from a long day. So, why not be able to hug a responsive cute fuzzy teddy bear?

The idea for my final project is still pretty rough, but I want to make something that is cute and wholesome that can also help promote well-being as final season is approaching. I was thinking of a teddy bear with a pressure sensor that activates LEDs that form a heart shape when the user hugs it. Maybe I could also figure out getting it to output randomized sounds for each hug, such as “That made my day!” “Aww thanks!” “Cozy!” Etc.. The P5 screen could animate a corresponding background for the teddy bear in awe, such as a bunch of hearts growing in size or cheerful floating bubbles. In the end, I just want to create something that will make users feel loved and appreciated, even if it’s just a little teddy bear

For a back up idea, that’s actually quite ambitious, I thought I could make a fake robot pet that’s always grumpy and will turn around and move away from you when you come close to it unless you have a hot treat for it. I think think the hot treat part might be a bit hard to accomplish, because warm cookies aren’t super hot and I haven’t used a temperature sensor yet, so I don’t know how sensitive it is

Reading Reflection – Week 11

In this exploration between design and disability, the author shows how design can evolve beyond simply addressing a disability and instead serve as a powerful tool for self-expression and even empowerment. Glasses were once purely a medical device, and now, they have become a fashion accessory, where people who don’t even need glasses to fix their vision will still want a pair for the looks of it. This shift in design can go from solely functionality to embracing style and personal expression, and the glasses example was pretty predictable, but the example on Hugh Herr’s prosthetic limbs in particular really stood out! I liked that he used his prosthetics as a form of empowerment towards him as a rock climber by having telescopic legs that could extended to different lengths while climbing, which would give him an advantage.

I think the topic of accessibility is one that can never be spoken about enough, as there’s always something that ends up being inaccessible because it wasn’t clear if accessibility was kept in mind while creating those designs. We have to keep in mind that not all disabilities are the same and not all disabilities are visible. With how much we’re advancing today and continuing to advance each day, we can learn more on how to move beyond the traditional medical models and instead figure out how to enhance and celebrate the body as well as the technology and artistry of the medical device.

 

Exercise 1:

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.

The location of the x of ellipse is being altered by the potentiometer.

The value from the potentiometer is mapped between 0 and 640, the width of the canvas.

Utilizing a Potentiometer, the ellipse moves along the horizontal axis, while also changing colors by making changes to the B value of fill.

Arduino Code: 

P5 Code:

let ellipseX = 0; //x value of ellipse to be changed by potentiometer
let B =0;

function setup() {
  createCanvas(640, 480);
  ellipseMode(CENTER);
}

function draw() {
  clear();
  background(0)
  fill(255,0,B);
  ellipse(ellipseX, height/2, 50, 50);


  if (!serialActive) {
    text("Press Space Bar to select Serial Port", 20, 30);
  } else {
    text("Connected", 20, 30);  
    // Print the current values
    text('ellipseX = ' + str(ellipseX), 20, 50);
  }
}

function keyPressed() {
  if (key == " ") {
   
    setUpSerial(); //establish serial communication
  }
}

function readSerial(data) {  
  if (data) {    //run only if data is received
    data = data.trim(); // Remove any whitespace
    if (!isNaN(data)) { //check whether data is a number or not
      //debug: console.log("Received:", data);
      ellipseX = int(data);
    }
  }

Exercise 2:

Make something that controls the LED brightness from p5.

A slider is created and data from it is sent to the Arduino. Based on the input from the p5 sketch, the LED’s brightness is adjusted accordingly.

Arduino Code: 

P5 Code:

let slider;
let brightness = 0;
function setup() {
  createCanvas(400, 400);
  // Create a brightness slider
  slider = createSlider(0, 255, 128);
  slider.position(width/2, height/2);
  slider.style('width', '100px');
}
function draw() {
  background(255);
  if (!serialActive) {
    textAlign(CENTER)
    text("Press Space Bar to select Serial Port", width/2, height/3);
  } else {
    text("Connected", width/2, height/3);
  }
  brightness = slider.value();
}
function keyPressed() {
  if (key == " ") {
    // important to have in order to start the serial connection!!
    setUpSerial();
  }
}
function readSerial(data) {
  console.log(data);
    let dataToSend = brightness + ", \n";
    writeSerial(dataToSend);  
}

Exercise 3:

Take the gravity wind example and make it so every time the ball bounces one led lights up and then turns off, and you can control the wind from one analog sensor.

Using a potentiometer mapped from -2 to 2, when the potentiometer is towards the left, the wind blows towards the left, and vice versa. The LED lights up every time the ball touches the bottom edge of the canvas.

A serial signal is sent to arduino everytime the ball touches the bottom of the canvas, resulting in the led to light up on the arduino. The potentiometer’s value will be reflected in the direction that the wind is blowing on the ball. I also added two walls on the right and left sides of the canvas, to prevent the wind from blowing the ball outside of the canvas.

Arduino Code:

P5 Code:

let led;
let velocity;
let gravity;
let position;
let acceleration;
let wind;
let drag = 0.99;
let mass = 50;

function setup() {
  createCanvas(640, 360);
  noFill();
  position = createVector(width/2, 0);
  velocity = createVector(0,0);
  acceleration = createVector(0,0);
  gravity = createVector(0, 0.5*mass);
  wind = createVector(0,0);
}

function draw() {
  background(255);
  applyForce(wind);
  applyForce(gravity);
  velocity.add(acceleration);
  velocity.mult(drag);
  position.add(velocity);
  acceleration.mult(0);
  ellipse(position.x,position.y,mass,mass);
  if (position.y > height-mass/2) {
      velocity.y *= -0.9;  // A little dampening when hitting the bottom
      position.y = height-mass/2;
    
    
    if(serialActive){
      writeSerial("bounced\n");
    }
    }
  // Check for collisions with the left wall
  if (position.x < mass / 2) {
    velocity.x =0; // Reverse horizontal velocity (bounce)
    position.x = mass / 2; // Correct position
  }

  // Check for collisions with the right wall
  if (position.x > width - mass / 2) {
    velocity.x =0; // Reverse horizontal velocity (bounce)
    position.x = width - mass / 2; // Correct position
  }
}

function applyForce(force){
  // Newton's 2nd law: F = M * A
  // or A = F / M
  let f = p5.Vector.div(force, mass);
  acceleration.add(f);
}




function keyPressed() {
  if (key == " ") {
    // important to have in order to start the serial connection!!
    setUpSerial();
  }
  if (keyCode==DOWN_ARROW){
    //mass=random(15,80);
    position.y=-mass;
    velocity.mult(0);
  }
}


function readSerial(data){
  
  if (data != null){
    wind.x=int(data);
    console.log("working");

  }
}

 

Final Project Ideas

Concept: 

Similar to part of my midterm project, I want to create another drum machine. However, instead of it being automated, I hope to create a drum machine that is based on human input.  The project would consist of audio and visual elements on the p5 side, and buttons, as inputs that activate the drum sounds on the arduino side.

Inspiration: 

Akai MPC Studio 2

I wish to use arduino, connected to buttons, which would activate the sounds that play through p5.js. I hope to utilize arcade style buttons, housed within a 3D printed, cardboard, or wood housing.  Leapiture Arcade Buttons, 5pcs Arcade Game Buttons Game Buttons 5V 12V With Professional LED Lighting Built-in Switch For Arcade Machine Games Parts ...

The project would be engaging, allowing participants to actively create new drum beats.

Reading Reflection – Week #11

Design Meets Disability is an extremely captivating piece that raised interesting questions for me to contemplate. I find the first example, with glasses, to be the most compelling, as it illustrates that design is a necessary component even for seemingly medical tools and devices. It is surprising to learn that glasses were initially not intended to be styled at all, whereas nowadays they belong to their own branch of fashion. The fact that glasses are not simply used but worn gives them importance from a different perspective: as a social tool rather than purely a medical one. Similarly, design is critical for various prosthetics, and each one of them has its own specifics. Unlike glasses, prosthetics are integrations of the body, a crucial factor for designers to consider.

The text also touches upon the universality of design, a concept I approach with caution. While design can aim for inclusivity, I don’t believe a single design can ever accommodate everyone at once. This goal is elusive and should not be the designer’s primary focus. It was interesting to point out two different approaches to “universality” in design: one that tries to include everything so it works for everyone, and another that, on the contrary, makes the design as simplistic as possible to ensure it is universally straightforward to use.

Both methods are quite problematic, and the task of a good designer is to situate their work somewhere in between these two extremes. However, what is certain is that universality should not be the primary goal of design; simplicity should be valued above all. I agree with the text’s author that good design is not only about how an object looks but, more importantly, about how it works, as Steve Jobs aptly stated. This principle applies to everything, from iPod to an arm prosthetic.

Final Project Idea

For two of my assignments this semester, I incorporated my guitar in arduino as an unusual switch for turning on LED lights. I really enjoyed working with it, and I figured that I might as well expand upon it for my final project. The idea of an unusual switch reminded me of videos I’ve watched in which people try to beat video games using modified objects as controllers —  dance pads, bongos, and even bananas.

Combining my hobbies, I will create an interactive system where players will use a guitar as a gamepad of sorts to defeat enemies in a p5 game. I don’t have an idea for the actual game yet, but I expect it to have a quirky, cartoonish style inspired by the Scott Pilgrim franchise, in which the titular character is a bassist and finds himself in video-game-esque fights.

Reading Reflection #8: Design Meets Disability

The author offers a really insightful perspective on the relationship between  fashion and practical design. We often assume that medical devices and aesthetic value are inherently incompatible, but the emotional is just as important as the physical; fashionable prosthetics can provide emotional value for its users by creating a positive image and de-stigmatizing disabilities without deliberately hiding the device.

This just goes to show how inspiration often comes from the most unexpected places, therefore we must keep an open mind in order to come up with good designs instead of setting too much limitations. It is only through interdisciplinary efforts that we can take each field to new heights. While I still do not have a concrete idea for my final project, this excerpt made me consider making something that enhances some kind of human activity adding an artistic touch to it, which is more of my strong suit.

Week 11 – Reading Reflection

While reading Design Meets Disability, I found myself thinking about the tension between discretion and visibility in design for disability. The idea that glasses have successfully transitioned from being a purely functional medical device to a fashionable accessory made me wonder whether this will also happen for hearing aids or prosthetics. Are we, as a society, more comfortable with visible “disabilities” like poor eyesight because they’ve been normalized for centuries? If so, what would it take for other assistive devices to undergo a similar transformation? I thought about a friend’s reluctance to wear a brace for a sprained wrist in high school—she felt like it felt like it called too much attention to itself, even though it was helping her heal. Why does function often have to feel like a trade-off with self-expression?

The discussion of the Eames leg splint also sparked questions about the role of aesthetics in design born out of necessity. I found it very interesting how such a utilitarian object could later inspire iconic furniture. Does this mean that every functional object has hidden potential for beauty, or does it require someone with a particular eye to uncover it? It made me think about the way my grandfather modified his walking cane to reflect his personality—adding small carvings and even painting parts of it to make it less clinical. Could design for disability embrace more of this individuality from the start? The reading left me questioning not just how we design for diverse bodies, but how we might better celebrate the creativity that comes from these constraints.

Assignment 10 – Stranger Things (with David)

Concept

For this project, we thought of recreating a recognizable music theme from film/TV series that we could easily manipulate. We ended up on the eerie and haunting Stranger Things theme, as it is truly one of those few captivating intros that you would never skip. We also decided to dedicate this project to the upcoming final season of the series, which will be released next year.

By using the ultrasonic distance meter and tricolor LED, we made a musical instrument that is responsive to the distance of the hand: the music speeds up when the hand is closer and slows down when it goes farther, and the LED changes its color accordingly.

Sketch

Code Highlight

void loop() {
buttonState = digitalRead(buttonPin);

if (buttonState == LOW) { 
for (int thisNote = 0; thisNote < 48; thisNote++) {

// distance measured with ultrasonic sensor

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

duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;

// mapping the tricolor LED values

int redValue = map(distance, 5, 50, 255, 100); 
int greenValue = 0; 
int blueValue = map(distance, 5, 50, 100, 255);

analogWrite(redPin, redValue);
analogWrite(greenPin, greenValue);
analogWrite(bluePin, blueValue);

// mapping to adjust duration between notes

int adjustedNoteDuration = map(distance, 5, 50, StrangerThingsNoteDurations[thisNote] / 2, StrangerThingsNoteDurations[thisNote] * 2);

// playing with the new tempo

tone(buzzerPin, StrangerThingsMelody[thisNote], adjustedNoteDuration);

// a short pause

delay(adjustedNoteDuration * 1.3);
}

} else {

// when button is not pressed, turning off the LED and buzzer

analogWrite(redPin, 0);
analogWrite(greenPin, 0);
analogWrite(bluePin, 0);
noTone(buzzerPin);
}

delay(50); 
}

It was difficult at first to find the music in the proper format so that it can be implemented into the Arduino code. As we tried to somehow extract the notes from the .mxl (.musicxml) files, we couldn’t find a software that could do that. Hence, we ended up recreating the soundtrack by using the array of sequences (representing the 48 notes and their durations) that we luckily found on the GitHub.

We using mapping for the tricolour LED lights, keeping greenValue at zero so that we could get a somewhat “gradient” effect.

The key (and most challenging) aspect in the code was to speed up the music according to the varied distance. We used mapping to set the shortest and longest duration of the music, as well as implemented  a delay by multiplying the adjustedNoteDuration by 1.3 (a factor commonly used in Arduino to maintain a natural pacing) to add a slight pause between notes, making each note more distinct.

Embedded Sketch

GitHub

Assignment #8: Stranger Things [in team with Ryan]

Concept & Inspiration.

For this project, we thought of recreating a recognizable music theme from film/TV series that we could easily manipulate. We ended up on the eerie and haunting Stranger Things theme, as it is truly one of those few captivating intros that you would never skip. We also decided to dedicate this project to the upcoming final season of the series, which will be released next year.

By using the ultrasonic distance meter and tricolor LED, we made a musical instrument that is responsive to the distance of the hand: the music speeds up when the hand is closer and slows down when it goes farther, and the LED changes its color accordingly.


Highlights.

It was difficult at first to find the music in the proper format so that it can be implemented into the Arduino code. As we tried to somehow extract the notes from the .mxl (.musicxml) files, we couldn’t find a software that could do that. Hence, we ended up recreating the soundtrack by using the array of sequences (representing the 48 notes and their durations) that we luckily found on the GitHub.

We using mapping for the tricolour LED lights, keeping greenValue at zero so that we could get a somewhat “gradient” effect.

The key (and most challenging) aspect in the code was to speed up the music according to the varied distance. We used mapping to set the shortest and longest duration of the music, as well as implemented  a delay by multiplying the adjustedNoteDuration by 1.3 (a factor commonly used in Arduino to maintain a natural pacing) to add a slight pause between notes, making each note more distinct.

void loop() {
buttonState = digitalRead(buttonPin);

if (buttonState == LOW) { 
for (int thisNote = 0; thisNote < 48; thisNote++) {

// distance measured with ultrasonic sensor

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

duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;

// mapping the tricolor LED values

int redValue = map(distance, 5, 50, 255, 100); 
int greenValue = 0; 
int blueValue = map(distance, 5, 50, 100, 255);

analogWrite(redPin, redValue);
analogWrite(greenPin, greenValue);
analogWrite(bluePin, blueValue);

// mapping to adjust duration between notes

int adjustedNoteDuration = map(distance, 5, 50, StrangerThingsNoteDurations[thisNote] / 2, StrangerThingsNoteDurations[thisNote] * 2);

// playing with the new tempo

tone(buzzerPin, StrangerThingsMelody[thisNote], adjustedNoteDuration);

// a short pause

delay(adjustedNoteDuration * 1.3);
}

} else {

// when button is not pressed, turning off the LED and buzzer

analogWrite(redPin, 0);
analogWrite(greenPin, 0);
analogWrite(bluePin, 0);
noTone(buzzerPin);
}

delay(50); 
}

Embedded Sketch.

GitHub