Response: Led Manovich’s “The Language of New Media”

In “The Language of New Media”, Led Manovich discusses what constitutes new media, defining elements that distinguish it from the old, traditional media, while establishing connections between new media technologies and shifts in culture and society. In the first half of his book, he elaborates on the principles of new media, defining aspects such as numerical representation, variability, automation, modularity, and transcoding. After defining such terms, he explores the relation between new media and society, and the way they have mutually influenced each other. 

What is New Media?

The following are the ways I understand the elements that constitute new media:

  • Numerical representation: new media can be essentially stripped down into discrete numbers. Examples of such components are the the pixels, time frames, etc. in a film or image, which ultimately constitute a film and other new media objects. Numerical representation also allows new media objects to be changed and edited through algorithms, which means they are also programmable.
  • Modularity: allows for numerical representation. All new media technologies have, ultimately, the “same modular structure throughout”,  which allows them to be accessed and edited easily (51). Ex: webpages are made up of many different media elements: text, images, video, etc.
  • Automation: certain programs, such as Photoshop and other image editing programs have a certain level of automation, which allows them to complete certain actions without a large input from the user. Ex: automatic correction of images.
  • Variability: mutability. Variability of new media allows for many different versions of the same medium. It can be stored in a media database, and altered or influenced according to the user’s input. For instance, variability is present in an interactive media installation where the piece shifts according to a person’s movement. Variability also includes scalability, which allows for more complex interactions.
  • Transcoding: the action of changing something into another format. This is the shift between the “cultural layer” and the “computer layer”, which both influence each other. (Note: cultural layer – story, plot, composition, etc. computer layer – process, variables, functions, etc.)

The Interface

One of the most interesting aspects that Manovich explores is the way changes in media technologies correlate with social change. In traditional, industrial society, huge generalizations were made on populations, and it was largely believed that everyone was supposed to have the same goods and beliefs. Following this general line of thought, media was meant for the masses with no regards to individuality or uniqueness. This trend explains how most media was copied exactly and produced and distributed to everyone as a way of enhancing this uniformity. However, once society started shifting more towards a culture that rejected conformity, media started changing according to the individual. An example of this is the way websites change according to one’s search history and actions on the web to customize the ads, images, or search options presented to each person.

These trends explored by Manovich also introduce one of his main discussions regarding the language of cultural interfaces. As was demonstrated earlier, an essential part of new media is the “desire to externalize and objectify the mind’s operations” (74). As a way of reflecting societal and cultural factors, interfaces have always tried to imitate the mind’s workings through different methods. A perfect example of this is hyperlinking. By linking certain words or images to other related webpages, interfaces attempt to imitate the mental process of associating certain objects with larger themes, memories, or emotions. However, this process also brings to question the restrictions of new media in respect to its users mental work and processing. If web pages and other forms of media are populated with links that lead to an already established structure, what does this mean for us? Aren’t we just following a path somebody else set out while being tricked into thinking that we were the ones who made that association? Through so many hyperlinks and access to information, aren’t we being distracted from our original goal or purpose in being in that website? Or rather, is our experience enhanced due to the availability of so much information? These are some of the questions that Manovich brings up on this reading, which really invite reflection on the relationship between culture and media. Another essential aspect Manovich brings to light is the way cultural forms such as cinema, printed word, and human-computer interface are so present in all aspects that they offer different ways to create, visualize, and organize data. In this same light, are we active participants in this wave of transformation, or rather, are we being carried away by the changes fostered by these cultural media forms?

Self-portrait

For this assignment, I wanted to explore a way of representing myself both in a physical and emotional manner. Of course, the physical way would be through the lines and the visuals themselves, but I wanted to shape them in a way as to suggest a bit more into my personality.

I have always thought of myself as a person that takes a while to open up to others. I see my personality as one that is “layered”, and as I get more and more comfortable with a person, more of these layers become exposed. I wanted to play around with this idea by creating a portrait that only showcased certain parts of the portrait when hovered in an area, and then exposed the full image once all the layers are hovered in rapid succession. When thinking in terms of programs such as Adobe Photoshop or Illustrator, this idea of layers seemed quite simple. However, once it was time to implement it into Processing, the difficulty of the task emerged.

The most challenging aspect about this process was figuring out how to save the layers and make them accessible in such a way as to distinguish them from each other. With the code we did in class that simulated any painting program, it was easy to simply draw anything. However, when it came to distinguishing layers, the process did get more complicated than I had thought.

These were the steps that needed to be followed simply to create three different layers:

  1. Allow user to “draw” first layer using the mouseX and pmouseX functions
  2. Save all the x and y coordinates that corresponded to the user’s drawing and add them into an array
  3. Repeat this for the three layers, ensuring that with the click of a mouse, the program would know that the user was making a different drawing
  4. After all the drawings were saved into the corresponding arrays, the program would check whether the mouse was hovering over the toggle buttons and drew all the x and y coordinates into the plane.

These was the original image I chose as a basis (of myself in junior year in high school): 

I decided to create a contour line drawing, as it was the only option for the code I had written. Regardless, I found it extremely fun to play around and try to create a self portrait solely through one line. Here is the first sketch I made in photoshop, which served as a basis for my sketch in Processing:

Finally, when it actually came time to draw the image in Processing, it was extremely hard to copy what I had done before. I tried multiple times and it still looked a bit off, but regardless, I feel there is a certain interesting aspect to the way the different lines and colors shape my portrait.

Here are various gifs of the way the code works (including the final image)

First step: drawing

Second/final step: hovering

Surprisingly, the most challenging aspect of this assignment was not the code. Rather, drawing the image with a continuos line and no eraser whatsoever made it a difficult task, but one that still ended up being really rewarding.

Attached is the code used for this project:

boolean layer1 = true;
boolean layer2 = false;
boolean layer3 = false;
boolean drawplease = false;
boolean restartDrawing = false;
int rectWidth = 150;
int rectHeight = 50;

int[] xlayer1 = {};
int[] ylayer1 = {};

int[] xlayer2 = {};
int[] ylayer2 = {};

int[] xlayer3 = {};
int[] ylayer3 = {};

void setup(){
 size(600,600);
 background(255,255,255);
}

void draw(){
 //reseting background 
 if (restartDrawing == true){
 background(255,255,255);
 }
 //making hover buttons
 noStroke();
 fill(230,209,217);
 rect(20,20,50,50);
 fill(189,188,189);
 rect(70,20,50,50);
 fill(92,90,91);
 rect(120,20,50,50);
 //checks if person is drawing, saves the coordinates into arrays
 if (layer1 == true){
 int Xcoordinate = mouseX;
 int Ycoordinate = mouseY;
 xlayer1 = append(xlayer1, Xcoordinate);
 ylayer1 = append(ylayer1, Ycoordinate);
 stroke(230,209,217);
 strokeWeight(1.5);
 line(mouseX,mouseY,pmouseX,pmouseY);
 }
 
 else if (layer2 == true){
 int Xcoordinate = mouseX;
 int Ycoordinate = mouseY;
 xlayer2 = append(xlayer2, Xcoordinate);
 ylayer2 =append(ylayer2, Ycoordinate);
 stroke(189,188,189);
 line(mouseX,mouseY,pmouseX,pmouseY);
 }
 
 else if (layer3 == true){
 println("case 3");
 int Xcoordinate = mouseX;
 int Ycoordinate = mouseY;
 xlayer3 = append(xlayer3, Xcoordinate);
 ylayer3 = append(ylayer3, Ycoordinate);
 //stroke(79,76,77);
 stroke(92,90,91);
 line(mouseX,mouseY,pmouseX,pmouseY);
 }
 
 //checks where mouse is located, shows specific layers depending on this
 if (drawplease == true){
 restartDrawing = true;
 if (20 < mouseX && mouseX < 70 && 20 < mouseY && mouseY < 70){
 println("first layer visible");
 for (int i = 0; i < (xlayer1.length - 1); i++){
 stroke(230,209,217);
 //strokeWeight(2);
 line(xlayer1[i],ylayer1[i],xlayer1[i+1],ylayer1[i+1]); 
 }
 }
 else if (70 <= mouseX && mouseX < 120 && 20 < mouseY && mouseY < 70){
 println("second layer visible");
 for (int l = 0; l < (xlayer2.length - 1); l++){
 stroke(189,188,189);
 line(xlayer2[l],ylayer2[l],xlayer2[l+1],ylayer2[l+1]); 
 }
 }
 else if (120 <= mouseX && mouseX < 170 && 20 < mouseY && mouseY < 70){
 println("third layer visible");
 for (int s = 0; s < (xlayer3.length - 1); s++){
 //stroke(79,76,77);
 stroke(92,90,91);
 line(xlayer3[s],ylayer3[s],xlayer3[s+1],ylayer3[s+1]); 
 }
 }
}

}
 //checks if mouse is pressed. if so, stops drawing layers and saves 
void mouseClicked(){
 if (layer1 == true){
 layer1 = false;
 layer2 = true;
 layer3 = false;
 print("first save",layer1,layer2,layer3);
 }
 else if (layer2 == true){
 layer1 = false;
 layer2 = false;
 layer3 = true;
 println("second save",layer1,layer2,layer3);
 }
 else if (layer3 ==true){
 layer1 = false;
 layer2 = false;
 layer3 = false;
 drawplease = true;
 println("third save",layer1,layer2,layer3);
 }
}

 

Response: Casey Reas and Margaret Hamilton

In his talk, Casey Reas explores the possibilities that result from the juxtaposition of chaos and order, and the balance that can be created through such means. His talk is divided into various sections, starting with elaborating on the concepts of chaos and order, and the vast array of outcomes that surge through different levels of constraints in both areas. He also contends on the essence of creating art through code, which allows for enough freedom for the program to create its own art while at the same time allowing the artist to establish certain frameworks or limitations. This combination of structure and chaos is what constitutes this type of art, and what adds to the importance of chance in this area. By making these installations highly chance-based, artists allow for an endless array of possibilities. As with the example of the Commodore 64, Reas demonstrated how a simple matter of chance can result in exceptional outcomes. Before watching this talk, I had not considered the beauty of chaos in art. In all my previous works, I always desired total control in every aspect, and stirred away from anything that would contribute to a level of  uncertainty or randomness in my final piece. In paintings and drawings, I even made countless of drafts before elaborating the final piece to ensure that it would result exactly in the way I wanted to. After listening to Reas’ words, I am now more open to the possibility of implementing chance to works of art. Below are some of the works that caught my attention the most.


On another note, Margaret Hamilton’s feats are yet another example of the emerging possibilities of going against the norm. While Reas and other similar artists revolutionized art by introducing the concept of creating works based on random chance and certain constraints, Hamilton pushed the boundaries of what was perceived a woman could do to successfully “get humans on the moon”. The sheer hard work and dedication she mustered to combat all preconceived notions on women in the sciences is truly remarkable and inspiring. Such achievements are examples of the advantages of not conforming to socially acceptable standards, and rather working around them to create a vast array of outcomes which were not even perceived as possible in the past.

Maneki-Neko

Out of all the previous assignments, this task has been the most distinct one we have made, since it was based on mechanical skills rather than on programming and code. While thinking about possibilities to “make a motor that moves like a person”, I started to consider basic hand movements that could still give a sense of personality to the machine. Thus, I decided at first to make a robot (in the shape of an animal of course, to follow up with my previous assignments) that would high five people. However, once I actually started building the piece, I realized that the minimum speed for the DC motors was simply too fast, which would unfortunately result in a slapping machine. Therefore, I hesitantly decided to branch out from this idea and create a Maneki-Neko, a common Japanese figurine which is thought to bring good luck. These cats are usually mistaken to be “Chinese lucky cats” due to their popularity in Chinese markets, and are usually seen in front of Chinese stores doing their widely-recognized hand movement:

Originally, my idea of making it high five was more related to a “movement of a person”, but due to the limitations of the motor and my own stubbornness, I decided to continue with the same idea of the Maneki-nekos and their hand movements. After all, their movements do seem like high fives.

Thus, I made my own version of a maneki-neko:

When I first started constructing the maneki-neko, I thought it would just be a simple matter of attaching the cat’s hand to a pole, attaching a small stick to the DC motor, and then creating the hand movement every time the stick would move the pole up and down. At least in my head, this worked perfectly, and it was just a matter of minutes before I got a hang of the physics and mechanics needed for doing this. However, all attempts failed miserably, since when I actually started constructing everything, the simple hand movement could not be done with just a stick and a pole. Thus, in my distress, I turned to Michael Shiloh’s rotating figures, and found a system that could fit perfectly into the movement I wanted to create.

I then proceeded to use his mechanics as a basis, while adding a figure of the cat’s arm to the end of the cardboard. At first, I wanted to make a physical hand rather than just a paper cutout, so I used silicone glue, some white cloth, and paper mache filling to make the hand. However, after attaching the motor to the whole system, the hand and the cardboard turned out to be too heavy for the motor to rotate, so I ended up substituting them with a popsicle stick and the cutout. I also added some boundaries with cardboard to restrict the sporadic movement that would result as an effect of the strength of the motor.

Initial trial with cardboard (which had to be changed to popsicle sticks due to their heaviness)
Stuffed paw I was going to use at first.
Workings on the back of maneki-neko
The installation as seen from the top.

Since this task was mainly focused on the physical components rather than the code, I used a simple code that used a potentiometer to change the rotation speed of the motor.

//setting up pins
int potPin = A5;
int motorPin = 9;
int potValue = 0;
int motorValue = 0;

void setup() {
 Serial.begin(9600);
}
//controlling motor according to potentiometer 
void loop() {
 potValue = analogRead(potPin); 
 motorValue = map(potValue, 0, 1023, 0, 255);
 analogWrite(motorPin, motorValue); 
 Serial.print("potentiometer = " ); 
 Serial.print(potValue);
 Serial.print("t motor = ");
 Serial.println(motorValue);
 delay(1000); 
}

Stupid Pet Trick: Scaredy-“Cat”

My ultimate goal for the Stupid Pet Trick assignment was to create something that would have a personality of its own, not simply a systematic machine that seemed to just follow inputs and emit outputs. Thus, while brainstorming, I started considering projects that were related to making users “play around” with the creature, which is why I decided to make a creature that was scared of the light.

Description:

The creature would be surrounded by 4 LEDs (controlled by the user through knobs) and would avoid light by finding and rotating through a servo to a location that had no emitting light. Apart from its movements, this creature would also change color according to how “threatened” it felt, which would also add a lot to the personality aspect. Thus, in the end I decided to make an octopus (since they have the ability to camouflage and change colors) that would be, in a normal state blue, but as more and more LEDs turned on, it would change color until it would turn to a blinking red color when it couldn’t find a location without light. If all the LEDs were on, the octopus would move frantically and emits a blinking red light.

I placed the octopus in a ocean-like environment to follow up with the “underwater” theme. Initially, I wanted to make four predator figures (such as the shark head seen below) . And place LEDs inside them to add more to the “threatened” aspect of the project. However, due to time constraints and my struggles with paper art and origami, I decided to instead implement the lights into the environment to make it seem as if the creatures emitting the lights were hiding instead.

Final setup – the cables were extremely difficult to hide, so I simply placed them inside another box.
Underwater environment
Example of shark head I wanted to use to place LEDs in.

The interaction:

In this project, the user serves as the “controller” of the predators. Through four knobs, it can control with LEDs are on and their brightness. According to the changing LED states, the octopus shies away to locations where there are no emitted lights. Thus, in the end, it creates a fun interaction between the user and the creature in which the creature tries to escape the user’s lights. Below is a video of the final outcome. (Due to several complications explained later in this post, I was only able to record a small video sample, showing the final outcome where all LEDs turn on. The other videos attached in this post show the change in color and the octopus’ other movements)

The process:

Here are some of the initial sketches I made:

There were three ways I could elaborate this project:

  1. Utilizing solely photocells to find the location with the least light.
  2. Using solely input to give the impression that the creature was thinking (when it was actually just considering inputs)
  3. Combining both the photocells and input.

In the end, I decided to follow the third approach to make a more complete creature, since it would consider its environment through the photocells while also ensuring accuracy through the input information. However, I did not envision it would lead to so many complications in the process.

For instance, certain issues I had to consider was the amount of photocells I would use, their positions, how to limit the intruding light from the environment, whether the lights should be dimmed, and how to implement all this in the code.

My first trial was using two photocells that would be placed in either side of the creature. The code would then consider which photocell perceived the least light and would rotate to that position. The video below shows my first prototype for this method. At first, it seemed to be working correctly when only one LED was turned on. However, when two adjacent LEDs were on, the octopus would stay fidgeting between them and would not rotate anywhere else. Due to this issue, I decided to use the photocells for the creature to identify which LEDs were on and then move according to specific patterns using those inputs.

The final code had two states: The first: using the photocells to identify which LEDs were on. The second: “escaping mode” where it would move according to specific LED patterns (using an if-statement in the code).

After having the code and the initial prototype ready, it was necessary to actually make the model stable and functional, since the one I had before was composed of many small wires only connected through alligator clips. Thus, I started the whole process of soldering all my LED wires, the photocells, and the RGB LED. However, after this long process, when I attached the photocells and the RGBB LED onto the servo, the surface was too heavy and would fall out of place. I tried using super glue, sticky tack, and even the screws, but the surface that would hold the octopus kept falling out of place or would not follow the servo’s movements. This rose up the greatest complication during this process, since I realized that the cables I used for the soldering were too rigid, restricting the surface from rotating completely between the 0º and 180º positions. Thus, I had to discard of the previous solders I had done and instead soldered the smaller, more flexible wires together to allow for more movement. Nevertheless, even after fixing this aspect, the surface on the servo was still too heavy, and to complement this, for some still unknown reason, the photocells stopped working correctly. Thus, I decided to (painfully) discard of the photocells aspect in my project and instead focus only on input readings.

Sample of way the model worked with the photocells. As can be seen, the creature moves according to switching on of the LEDs.

Below is a video of the whole model actually working (without placing the creature on top yet):

Some aspects I took away from this project is how difficult (even more so than software) hardware can be, since even the smallest of complications in any part of the setup can lead to devastating results. I experienced this firsthand in this project when all my components and code functioned correctly at first but, once all were placed together, they were all too heavy for the octopus to rotate accurately without falling off. Thus, some improvements I would make would be to use another, bigger servo and ensure a method of attaching all the components more securely as to avoid this outcome. However, regardless of this, this project helped me learn more about the complications of “simulating” thought on the part of a robot, but was overall very fulfilling.

Final code:

#include <Servo.h>

Servo myservo; // create servo object to control a servo
int servoDegree; 

int photopin1 = A5; // analog pin used to connect potentiometer 1
int photopin2 = A4; // analog pin used to connect potentiometer 2

int photoReading1; //yellow (right) // variable to read the value from the analog pin
int photoReading2; // blue (left) // variable to read the value from the analog pin

int maxLight = 120;
int minLight = 7;

int knob4 = A2;
int knob2 = A3;
int knob3 = A0;
int knob1 = A1;

int yellowLed1 = 11;
int yellowLed2 = 6;
int yellowLed3 = 5;
int yellowLed4 = 13; //10

//RGB LED setup
const int RED_PIN = 4;
const int GREEN_PIN = 12;
const int BLUE_PIN = 2;

//variables for octopus' knowledge
bool led1 = false;
bool led2 = false;
bool led3 = false;
bool led4 = false;

bool start = true;
bool decideLight = true; 
bool countingState = true;
bool escapingState = false;
bool escapingState2 = false;
bool blueColor = true;

//counter for octopus' knowledge (know which LED is on)
int led1Counter = 0;
int led2Counter = 0;
int led3Counter = 0;
int led4Counter = 0;
int rightCounter = 0;
int leftCounter = 0;


void setup() {
 myservo.attach(9); // attaches the servo on pin 9 to the servo object
 pinMode(yellowLed1,OUTPUT);
 pinMode(yellowLed2,OUTPUT);
 pinMode(yellowLed3, OUTPUT);
 pinMode(yellowLed4, OUTPUT);
 pinMode(RED_PIN, OUTPUT);
 pinMode(GREEN_PIN, OUTPUT);
 pinMode(BLUE_PIN, OUTPUT);
 
 Serial.begin(9600);
}

void loop() {

 //placing servo in start position


 if (start == true){
 myservo.write(90);
 start = false;
 Serial.println("THIS WENT INTO START");
 delay(1500);
 }

 if (blueColor == true){
 digitalWrite(RED_PIN, LOW);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, HIGH);
 }
 
 //adjusting values of potentiometer
 photoReading2 = analogRead(photopin2); 
 photoReading1 = analogRead(photopin1); // reads the value of the potentiometer (value between 0 and 1023)
 
 delay(1);
 photoReading1 = map(photoReading1, maxLight, minLight, 180, 0); // scale it to use it with the servo (value between 0 and 180)
 photoReading2 = map(photoReading2, maxLight, minLight, 180, 0); // scale it to use it with the servo (value between 0 and 180)

// 
 Serial.println("reading 1: ");
 Serial.println(photoReading1);
 Serial.println(photoReading1);
 Serial.println(photoReading1);
//// delay(500);
 Serial.println("reading 2:");
 Serial.println(photoReading2);
 Serial.println(photoReading2);
 Serial.println(photoReading2);
// delay(500);
 
// Serial.println("servo previous position");
// Serial.println(servoDegree);
 
// delay(600);

 //identifying knob state for leds 
 int knobValue1 = analogRead(knob1);
 delay(1);
 int knobValue2 = analogRead(knob2);
 delay(1);
 int knobValue3 = analogRead(knob3);
 delay(1);
 int knobValue4 = analogRead(knob4);
 delay(1);
 
 int mappedValue1 = map(knobValue1,0,1023,0,255);
 int mappedValue2 = map(knobValue2,0,1023,0,255);
 int mappedValue3 = map(knobValue3,0,1023,0,255);
 int mappedValue4 = map(knobValue4,0,1023,0,255);
 
 int constrainedValue1 = constrain(mappedValue1,0,255);
 int constrainedValue2 = constrain(mappedValue2,0,255);
 int constrainedValue3 = constrain(mappedValue3,0,255);
 int constrainedValue4 = constrain(mappedValue4,0,255);


 //setting up potentiometers for LEDs
 analogWrite(yellowLed1, constrainedValue1);
 analogWrite(yellowLed2, constrainedValue2);
 analogWrite(yellowLed3, constrainedValue3);
 analogWrite(yellowLed4, constrainedValue4);

 //checking for servo's current position
 int servoDegree = myservo.read();
// Serial.println(servoDegree);

 delay(1000);
 
 //using photocell: helping octopus perceive which light is on 
 
 if (decideLight == true){
 blueColor = false;
 digitalWrite(RED_PIN, LOW);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, HIGH);
 
 Serial.println("THIS WENT INTO THE LOOP");
 
 //adding the counters to see which side to go to
 if (countingState == true){
 if(photoReading1 < photoReading2){ //if right is brighter than left
 rightCounter += 1;
 Serial.print("COUNTER RIGHT");
 }
 else if(photoReading1 > photoReading2){ //if left is brighter than right
 leftCounter += 1;
 Serial.print("COUNTER LEFT");
 }
 }
 
 //moving servo once
 
 if (rightCounter > 1){
 myservo.write(50); //go to right side
 Serial.println("MOVE RIGHT");
 countingState = false;
 Serial.println("COUNTING STATE FALSE");
 delay(1500);


 if (photoReading1 > photoReading2){ //adding up counter for led2
 led2Counter += 1;
 Serial.print("COUNTER LED 2");
 }
 else if (photoReading1 < photoReading2){ //adding up counter for led1
 led1Counter += 1;
 Serial.print("COUNTER LED 1");
 }

 if (led2Counter ==2){ //if counter gets to 2
 led2 = true;
 decideLight = false;
 escapingState = true;
 Serial.println("LED2 TRUE");
 }
 else if (led1Counter == 2){ //if counter gets to 2
 led1 = true;
 decideLight = false;
 escapingState = true;
 Serial.println("LED1 TRUE");
 }
 }

 else if (leftCounter > 1){
 myservo.write(130);
 Serial.println("MOVE LEFT");
 countingState = false;
 Serial.println("COUNTING STATE FALSE");
 delay(1500);

 if (photoReading1 > photoReading2){ //adding up counter for LED 4
 led4Counter += 1;
 Serial.print("COUNTER LED 4");
 }
 else if (photoReading1 < photoReading2){ //adding up counter for LED 3
 led3Counter += 1;
 Serial.print("COUNTER LED 3");
 }

 if (led4Counter == 2){
 led4 = true;
 decideLight = false;
 escapingState = true;
 Serial.println("LED4 TRUE");
 }
 else if (led3Counter ==2){
 led3 = true;
 decideLight = false;
 escapingState = true;
 Serial.println("LED3 TRUE");
 }
 }
 
 }


Serial.println("KNOB 1 VALUE");
Serial.println(knobValue1);
Serial.println(knobValue1);
Serial.println(knobValue1);
Serial.println("KNOB 2 VALUE");
Serial.println(knobValue2);
Serial.println(knobValue2);
Serial.println(knobValue2);
Serial.println("KNOB 3 VALUE");
Serial.println(knobValue3);
Serial.println(knobValue3);
Serial.println(knobValue3);
Serial.println("KNOB 4 VALUE");
Serial.println(knobValue4);
Serial.println(knobValue4);
Serial.println(knobValue4);

 
 //later logic: using what the octopus has learned to move
 if (escapingState == true){
 Serial.println("ESCAPTING STATE: MOVING");
 if (led1 == true){
 myservo.write(150);
 escapingState = false;
 escapingState2 = true;
 }
 else if(led2 == true){
 myservo.write(150);
 escapingState = false;
 escapingState2 = true;
 }
 else if(led3 == true){
 myservo.write(10);
 escapingState = false;
 escapingState2 = true;
 }
 else if(led4 == true){
 myservo.write(10);
 escapingState = false;
 escapingState2 = true;
 }
 }

 if (escapingState2 == true){
 Serial.println("LOOP FOR PATTERNS");
 if (knobValue4 > 200 && knobValue3 < 200 && knobValue2 < 200 && knobValue1 < 200){
 myservo.write(10);
 Serial.println("GREEN");
 digitalWrite(RED_PIN, LOW);
 digitalWrite(GREEN_PIN, HIGH);
 digitalWrite(BLUE_PIN, LOW);
 }
 else if (knobValue4 > 200 && knobValue3 > 200 && knobValue2 < 200 && knobValue1 < 200){
 myservo.write(30);
 Serial.println("PURPLE");
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, HIGH);
 }
 else if (knobValue4 > 200 && knobValue3 > 200 && knobValue2 > 200 && knobValue1 < 200){
 myservo.write(10);
 Serial.println("RED");
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, LOW);
 }
 else if (knobValue4 < 200 && knobValue3 > 200 && knobValue2 < 200 && knobValue1 < 200){
 myservo.write(30);
 Serial.println("GREEN");
 digitalWrite(RED_PIN, LOW);
 digitalWrite(GREEN_PIN, HIGH);
 digitalWrite(BLUE_PIN, LOW);
 }
 else if (knobValue4 < 200 && knobValue3 > 200 && knobValue2 > 200 && knobValue1 < 200){
 myservo.write(150);
 Serial.println("PURPLE");
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, HIGH);
 }
 else if (knobValue4 < 200 && knobValue3 > 200 && knobValue2 > 200 && knobValue1 > 200){
 myservo.write(150);
 Serial.println("RED");
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, LOW);
 }
 else if (knobValue4 < 200 && knobValue3 < 200 && knobValue2 < 200 && knobValue1 > 200){
 myservo.write(130);
 Serial.println("GREEN");
 digitalWrite(RED_PIN, LOW);
 digitalWrite(GREEN_PIN, HIGH);
 digitalWrite(BLUE_PIN, LOW);
 }
 else if (knobValue4 < 200 && knobValue3 < 200 && knobValue2 > 200 && knobValue1 > 200){
 myservo.write(100);
 Serial.println("PURPLE");
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, HIGH);
 }
 else if (knobValue4 < 200 && knobValue3 > 200 && knobValue2 < 200 && knobValue1 < 200){
 myservo.write(100);
 Serial.println("GREEN");
 digitalWrite(RED_PIN, LOW);
 digitalWrite(GREEN_PIN, HIGH);
 digitalWrite(BLUE_PIN, LOW);
 }
 else if (knobValue4 > 200 && knobValue3 > 200 && knobValue2 < 200 && knobValue1 > 200){
 myservo.write(60);
 Serial.println("RED");
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, LOW);
 }
 else if (knobValue4 > 200 && knobValue3 < 200 && knobValue2 > 200 && knobValue1 > 200){
 myservo.write(100);
 Serial.println("RED");
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, LOW);
 }
 else if (knobValue4 > 200 && knobValue3 < 200 && knobValue2 < 200 && knobValue1 > 200){
 myservo.write(100);
 Serial.println("PURPLE");
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, HIGH);
 }
 else if (knobValue4 < 200 && knobValue3 > 200 && knobValue2 < 200 && knobValue1 > 200){
 myservo.write(150);
 Serial.println("PURPLE");
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, HIGH);
 }
 else if (knobValue4 > 200 && knobValue3 < 200 && knobValue2 > 200 && knobValue1 < 200){
 myservo.write(50);
 Serial.println("PURPLE");
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, HIGH);
 }
 else if (knobValue4 < 200 && knobValue3 < 200 && knobValue2 > 200 && knobValue1 < 200){
 myservo.write(150);
 Serial.println("GREEN");
 digitalWrite(RED_PIN, LOW);
 digitalWrite(GREEN_PIN, HIGH);
 digitalWrite(BLUE_PIN, LOW);
 }
 else if (knobValue4 < 200 && knobValue3 < 200 && knobValue2 < 200 && knobValue1 < 200){
 myservo.write(90);
 Serial.println("BLUE");
 digitalWrite(RED_PIN, LOW);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, HIGH);
 }
 else if(knobValue4 > 200 && knobValue3 > 200 && knobValue2 > 200 && knobValue1 > 200){
 Serial.println("NO ESCAPE. ALL RED");
 myservo.write(60);
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, LOW);
 delay(500);
 myservo.write(120);
 digitalWrite(RED_PIN, LOW);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, LOW);
 delay(300);
 myservo.write(60);
 digitalWrite(RED_PIN, HIGH);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, LOW);
 delay(300);
 digitalWrite(RED_PIN, LOW);
 digitalWrite(GREEN_PIN, LOW);
 digitalWrite(BLUE_PIN, LOW);
 myservo.write(120);
 delay(500);
 //CRAZY COLORS 0% blue
 }
 }
 
 
}

Nostalgic Path

It seems to have become a trend for me to realise the unnecessary difficulty of my original ideas too late, and later changing them in the last minute. This occurred again in the case of this task, requiring me to change my original idea into something entirely new.

I initially wanted to create a simplified version of a sound mixer that would implement different analog and digital switches to have different effects. As the person interacted with the various switches, different beats and notes would be played, and they would be able to control their combination to create music pieces. I was planning on having two potentiometers that would play a specific rhythm, a soft potentiometer that would play different musical notes according to the pressure point, and a toggle that would change the speed of the rhythm. The elaboration of this first idea took me an enormous amount of time, since I had to first figure out if piezo buzzers were capable of playing two or more sounds at the same time. In the end, I managed to create a switch that would play a specific tone along with a soft potentiometer that would play different musical notes. However, regardless of all the struggle to fix the code,  the notes on the soft potentiometer would only play when the musical rhythm finished, meaning that they would not work simultaneously. Below is the first code I wrote, and a video showing the outcome of this “sound mixing”:

#include "pitches.h"

const int tone1 = 6;
const int tone2 = 5;
const int softpot1 = A0;
const int button1 = 8;
bool play = false;
int greenCount = 0;

//setting up melody A
int melodyA[] = {NOTE_F4, NOTE_F4, NOTE_D4, NOTE_F4,0};
int noteDurationsA[] = {4,4,8,4,4};


void setup() {
 pinMode(tone2,OUTPUT);
 pinMode(button1,INPUT);
 Serial.begin(9600);
 }


void loop() {
 //setting up variables
 int softpotValue = analogRead(softpot1);
 int buttonState1 = digitalRead(button1);

Serial.println(buttonState1);


 //soft potentiometer piano
 if (softpotValue >=800 && softpotValue <=1000){
 tone(tone1,261,300);
 delay(400);
// tone(tone1,261,300);
 }
 else if (softpotValue >=600 && softpotValue <=799){
 tone(tone1,293,300);
 delay(400);
// tone(tone1,293,300);
 }
 else if (softpotValue >=400 && softpotValue <=599){
 tone(tone1,329,300);
 delay(400);
// tone(tone1,329,300);
 }
 else if (softpotValue >=200 && softpotValue <=399){
 tone(tone1,349,300);
 delay(400);
// tone(tone1,349,300);
 }
 else if (softpotValue >=5 && softpotValue <=199){
 tone(tone1,392,300);
 delay(400);
// tone(tone1,392,300);
 }
 else if (softpotValue == 0){
 noTone(tone1);
// tone(tone1,261,100);
// delay(400);
// tone(tone1,261,100);
 }


//melody A if button is pressed
 if (buttonState1 == HIGH){
 for (int thisNote = 0; thisNote < 5; thisNote++) {
 int noteDurationA = 1000 / noteDurationsA[thisNote];
 tone(tone2, melodyA[thisNote], noteDurationA);

int pauseBetweenNotes = noteDurationA *1.50;
 delay(pauseBetweenNotes);
 }
 }

The music starts when the switch is on, but the soft potentiometer only works after the song is finished.

Due to these technicalities, and after realising that no two sounds can be performed simultaneously in an effective manner, I decided to shift my idea. I decided to create a (much more) simple “mixer” with the use of five switch buttons. The whole idea was that, as more buttons were switched on, the sounds became more complex and pleasant, ending with a complete musical piece all five switches were on. Every button would also be complemented with lights that would turn on to signal that the button was on. Below is a glimpse of the basic way this worked:

At first, I wanted to use neopixels, since I perceived this would be a great opportunity to learn how to use them for the stupid pet trick. However, due to time constraints, I hesitantly decided to use a UV Green LED, which ended up having a more pleasant result than I expected when contrasted with the black cardboard.

The most difficult part of this project was definitely the code. Although the structure was simple (two if-statements with a counter), the addition of the tune for the ending was challenging. Dipto Pratyaksa‘s Arduino version of the Mario Theme Song was extremely useful, but it had extra technicalities which I did not want to present in my final work. Thus, the notion of deleting these extra parts and shifting the code so these deletions would not affect the overall product was the most challenging of aspects. Then, after successfully making the song chime, I deleted various of its sections according to the button that would be pressed. For instance, if only one button was pressed, a very simple tune would sound (since many deletions had been done in the code). Below is an example of the final product:

Improvements:

As can be seen in the video, the most evident flaw in my code is that, due to the delay function used in the melodies, the lights and melodies can only change once the previous melody has ended. I originally wanted the changes to be instantaneous as soon as someone switches another switch on, but I was unable to fit the millis function into all of the five melodies, since they would stop ringing for a reason yet unknown to me. This would definitely be the one aspect I would like to improve from this work.

Final code:

#include "mario.h"

//defining variables 

const int tone1 = 6;
//const int melodyPin = 3;

#define melodyPin 3

const int button1 = 8;
const int button2 = 12;
const int button3 = 6;
const int button4 = 4;
const int button5 = 7;

int led1 = 13;
int led2 = 11;
int led3 = 2;
int led4 = 10;
int led5 = 5;

//counter for changing the melodies 
int counter = 0;

//setting up melody A
int melodyA[] = {NOTE_E7, 0, NOTE_E7,
 0, 0, 0,
 NOTE_G6, 0, 0,

 0, NOTE_E6, 0,
};

int noteDurationsA[] = {
 12, 12, 12,
 12, 12, 12, 
 12, 12, 12, 

 12, 12, 12, 
};

//melody B
int melodyB[] = {NOTE_E7, 
 0,
 0,
 NOTE_G6, 

 NOTE_C7,
 0, 
 0, 
 NOTE_AS6, 

 NOTE_G6, 
 NOTE_F7, 
 0, 
 NOTE_B6, 

 0,
 NOTE_E6,
 0, 
 0, 
};

int noteDurationsB[] = {
 12, 
 12, 
 12, 
 12, 

 12, 
 12, 
 12, 
 12, 

 9, 
 12, 
 12,
 12, 

 12, 
 12, 
 12, 
 12,
};

//Melody C
int melodyC[] = {NOTE_E7, NOTE_E7,
 0, NOTE_C7, 
 NOTE_G7, 0,
 NOTE_G6, 0, 

 NOTE_C7, 0, 
 0, 0, 
 0, NOTE_A6,
 0, NOTE_AS6, 

 NOTE_G6, NOTE_E7, NOTE_G7,
 NOTE_F7, NOTE_G7,
 0, NOTE_E7,
 NOTE_D7, NOTE_B6, 
};

int noteDurationsC[] = {
 12, 12, 
 12, 12, 
 12, 12, 
 12, 12, 

 12, 12, 
 12, 12, 
 12, 12, 
 12, 12, 

 9, 9, 9,
 12, 12, 
 12, 12, 
 12, 12, 
};

//melody D
int melodyD[] = {NOTE_E7, 
 NOTE_E7,
 NOTE_G7, 
 NOTE_G6, 

 NOTE_C7, 
 0,
 0, 
 NOTE_AS6, 

 NOTE_G6, 
 NOTE_A7, 
 NOTE_E7, 
 0, 

 NOTE_G7,
 NOTE_A7, 
 NOTE_C7,
 0,
};

int noteDurationsD[] = {
 12,
 12,
 12,
 12,

 12,
 12,
 12,
 12,

 9, 
 12,
 12,
 12,

 9, 
 12,
 12,
 12,
};

//Melody E (Complete version of Mario Theme Song)
int melodyE[] = {NOTE_E7, NOTE_E7, 0, NOTE_E7,
 0, NOTE_C7, NOTE_E7, 0,
 NOTE_G7, 0, 0, 0,
 NOTE_G6, 0, 0, 0,

 NOTE_C7, 0, 0, NOTE_G6,
 0, 0, NOTE_E6, 0,
 0, NOTE_A6, 0, NOTE_B6,
 0, NOTE_AS6, NOTE_A6, 0,

 NOTE_G6, NOTE_E7, NOTE_G7,
 NOTE_A7, 0, NOTE_F7, NOTE_G7,
 0, NOTE_E7, 0, NOTE_C7,
 NOTE_D7, NOTE_B6, 0, 0,

 NOTE_C7, 0, 0, NOTE_G6,
 0, 0, NOTE_E6, 0,
 0, NOTE_A6, 0, NOTE_B6,
 0, NOTE_AS6, NOTE_A6, 0,

 NOTE_G6, NOTE_E7, NOTE_G7,
 NOTE_A7, 0, NOTE_F7, NOTE_G7,
 0, NOTE_E7, 0, NOTE_C7,
 NOTE_D7, NOTE_B6, 0, 0
};

int noteDurationsE[] = {
 12, 12, 12, 12,
 12, 12, 12, 12,
 12, 12, 12, 12,
 12, 12, 12, 12,

 12, 12, 12, 12,
 12, 12, 12, 12,
 12, 12, 12, 12,
 12, 12, 12, 12,

 9, 9, 9,
 12, 12, 12, 12,
 12, 12, 12, 12,
 12, 12, 12, 12,

 12, 12, 12, 12,
 12, 12, 12, 12,
 12, 12, 12, 12,
 12, 12, 12, 12,

 9, 9, 9,
 12, 12, 12, 12,
 12, 12, 12, 12,
 12, 12, 12, 12,
};

void setup(void) {
 pinMode(3,OUTPUT);
 
 pinMode(led1,OUTPUT);
 pinMode(led2,OUTPUT);
 pinMode(led3,OUTPUT);
 pinMode(led4,OUTPUT);
 pinMode(led5,OUTPUT);
 
 pinMode(button1,INPUT);
 pinMode(button2,INPUT);
 pinMode(button3,INPUT);
 pinMode(button4,INPUT);
 pinMode(button5,INPUT);

 Serial.begin(9600);
 }

void loop() {
 //setting up variables
 int buttonState1 = digitalRead(button1);
 int buttonState2 = digitalRead(button2);
 int buttonState3 = digitalRead(button3);
 int buttonState4 = digitalRead(button4);
 int buttonState5 = digitalRead(button5);

 Serial.println(buttonState1);

 //restarting counter in each loop - program is constantly checking for changes in button states
 counter = 0;

 //First if statement: adding to the counter
 if (buttonState1 == HIGH){
 counter+=1;
 digitalWrite(led1,HIGH);
 }
 else{
 digitalWrite(led1,LOW);
 }

 if (buttonState2 == HIGH){
 counter+=1;
 digitalWrite(led2,HIGH);
 }
 else{
 digitalWrite(led2,LOW);
 }

 if (buttonState3 == HIGH){
 counter+=1;
 digitalWrite(led3,HIGH);
 }
 else{
 digitalWrite(led3,LOW);
 }

 if (buttonState4 == HIGH){
 counter+=1;
 digitalWrite(led4,HIGH);
 } 
 else{
 digitalWrite(led4,LOW);
 }

 if (buttonState5 == HIGH){
 counter+=1;
 digitalWrite(led5,HIGH);
 } 
 else{
 digitalWrite(led5,LOW);
 }

 //second if statement: playing the melody 
 if (counter == 1){
 int size = sizeof(melodyA) / sizeof(int);
 for (int thisNoteA = 0; thisNoteA < size; thisNoteA++) {
 int noteDurationA = 1000 / noteDurationsA[thisNoteA];

 tone(melodyPin, melodyA[thisNoteA], noteDurationA);

 int pauseBetweenNotesA = noteDurationA * 1.30;
 delay(pauseBetweenNotesA);
 }
 }
 if (counter == 2){
 int size = sizeof(melodyB) / sizeof(int);
 for (int thisNoteB = 0; thisNoteB < size; thisNoteB++) {
 int noteDurationB = 1000 / noteDurationsB[thisNoteB];

 tone(melodyPin, melodyB[thisNoteB], noteDurationB);

 int pauseBetweenNotesB = noteDurationB * 1.30;
 delay(pauseBetweenNotesB);
 }
 }

 if (counter == 3){
 int size = sizeof(melodyC) / sizeof(int);
 for (int thisNoteC = 0; thisNoteC < size; thisNoteC++) {
 int noteDurationC = 1000 / noteDurationsC[thisNoteC];

 tone(melodyPin, melodyC[thisNoteC], noteDurationC);

 int pauseBetweenNotesC = noteDurationC * 1.30;
 delay(pauseBetweenNotesC);
 }
 }

 if (counter == 4){
 int size = sizeof(melodyD) / sizeof(int);
 for (int thisNoteD = 0; thisNoteD < size; thisNoteD++) {
 int noteDurationD = 1000 / noteDurationsD[thisNoteD];

 tone(melodyPin, melodyD[thisNoteD], noteDurationD);

 int pauseBetweenNotesD = noteDurationD * 1.30;
 delay(pauseBetweenNotesD);
 }
 }

 if (counter == 5){
 Serial.println(" 'Mario Theme'");
 int size = sizeof(melodyE) / sizeof(int);
 for (int thisNoteE = 0; thisNoteE < size; thisNoteE++) {
 int noteDurationE = 1000 / noteDurationsE[thisNoteE];

 tone(melodyPin, melodyE[thisNoteE], noteDurationE);

 int pauseBetweenNotesE = noteDurationE * 1.30;
 delay(pauseBetweenNotesE);
 }
 }

}



 

Response: Roberto Casati – The Norm of Design

In his lecture, Roberto Casati dealt with the norm of design through a philosophical lense, inviting us to question about the nature of design, and whether a definition for it can really be articulated. This lecture to be divided into two sections. The first served as an introduction for the final claim he wanted to make regarding the norm of design and its difference to engineering.

To start, Casati presented an example where design solutions were implemented in order to solve the problem of young children bumping their heads against table corners. We evaluated two solutions, the first, that of obtaining a type of table corner made out of a soft material to place on short table corners, and the second solution of buying protective helmets specifically made for babies. Casati then proposed an alternative solution: that of making an improvised “signal” with sticks and a leaf so the child would know where the table corners were. After introducing this example, Casati asked us whether we considered these three solutions as design. After some discussion, it was established that all three could be considered designs, as they made a statement and provided solutions to day-to-day problems that are often overlooked. However, in this same line of thought, he then presented us with contrasting images of objects that were, essentially, the same thing but had different designs. I found it extremely interesting that Casati did not consider “objects that have a function”, like a traditional kettle, as a design but rather as a functionality. To what extent is this kettle making a statement? Isn’t this kettle a form of solution to difficulties serving or heating tea? This statement he made regarding whether this kettle was truly design made me really question my perspective on the norm of design. In contrast to him, I always considered design to be present everywhere, even in the simplest of objects. A chair, cup, even a door are all aspects that, along with serving a functionality, also have specific aspects to their design that make it more functional than others. As mentioned in our readings, slight variations in the design of these objects, regardless of how seemingly insignificant they may be, can make a user’s interaction with an object notably streamlined. In my opinion, such are the nuances that distinguish good design with mediocre ones, which also deem design as something that can be found everywhere. Due to these reasons, I found myself in disagreement with what Casati said in terms of what constituted designs. If we cannot settle for a definition, then how can we tell which objects constitute design and which ones don’t?

Reading Response: Design for Disability

The relationship between fashion and practicality and the concepts of discretion, universality, and simplicity are all aspects considered in Design Meets Disability in what can only be seen as an incredibly succinct and effective piece. Due to the large array of topics touched upon, I am going to focus on the idea of fashion, design, and discretion in design for disability. I must admit that before this reading, I had never thought about design for disability, and instead overlooked the concepts crucial to the success of objects to help the impaired. The first major claims made in this work refer to the relationship between fashion and practicality in the spectrum of design for disability. Previously, design for disability was focused on the concept of discretion, of attracting the least attention as possible. However, such attention to discretion only highlighted the suggestion that such disabilities needed to be hidden, rather than embraced or accepted. In light of this history, this reading deals with the fashion/design – discretion/practicality spectrum. Instead of trying to conceal a person’s disability, why not embrace it in such a way as to incite and explore new capabilities in design for disability? However, if taken onto the design and fashion extreme, wouldn’t some also say that it is, in a way, degrading for objects for those with disabilities to be close to fashion statements? These are some of the questions these reading brought up, leading us to reflect the place design for disability should take in terms of fashion and discretion.

An effective example brought up in this reading are glasses and eyewear in general. As mentioned, glasses are the true epitome of a perfect balance between fashion and discretion, to a point where they are not associated to any stigma whatsoever. Personally, I had never thought of glasses as what they truly are: eyewear for the visually impaired. It had never occurred to me that these items are, essentially, like any other object for people with disabilities. The fact that I overlooked this so much also emphasizes the author’s claims regarding the success of glasses in the realm of fashion and practicality. However, could this lack of stigmatization be more associated to the fact that so many people require vision correction? According to the Vision Council of America, about 75% of adults in the United States use or require some sort of vision correction. Due to the fact that this “disability” is a part of the majority, wouldn’t this acceptance of glasses rather be considered a worldwide attempt to avoid stigma rather than an effect of the glasses’ design? These are some questions that led me to understand that design alone cannot make such cultural statements or corrections; it can aid in this process and promote its progress, but it all comes down to the people’s reactions.

Overall, as mentioned beforehand, I found this reading extremely insightful. The issues brought up regarding fashion, discreteness, simplicity, and universality in design were innovative to the core, highlighting how design is truly a crucial aspect in our daily lives, even turning “vision correctors” into fashion statements in the form of eyewear.

Assignment #5: So many changes, end result: chameleon family

For the elaboration of this project, I was almost certain I wanted to use the RGB lights to create interesting outcomes with the colour possibilities. Now that we had enough knowledge to use analog input and output in our projects, I planned on using a sensor that would allow people to change the colour of the RGB LED at will, depending on their interaction with the object.

The first idea

The first thing I did after having this simple initial thought was to research on how these RGB LEDs work and the possible sensors that could be used to change their values.  My first objective was simply to understand how the colours of the RGB changed and using this to write  a simple code that would alternate its colours between red, green, and blue. The following video shows the outcome of this code:

const int redPin = 9;
const int greenPin = 10;
const int bluePin = 11;
const int sensor1 = A0;
int redValue, greenValue, blueValue;

void setup() {
Serial.begin(9600);
pinMode(redPin,OUTPUT);
pinMode(greenPin,OUTPUT);
pinMode(bluePin,OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
int sensorValue = analogRead(sensor1);
//setting RGB led to a position of the colors
setRGB(sensorValue);
}

void setRGB(int RGBposition)
{
int mapRGB1, mapRGB2, constrained1, constrained2;
redValue = (RGBposition);
greenValue= (RGBposition);
blueValue = (RGBposition);

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

After rejoicing in this little success, I then tried to implement a sensor that would determine which colours would lit up. After perusing the SparkFun handbook, I noticed there were specific tutorials for the sensors, and one specifically to change an RGB LED with a soft potentiometer which varied the resistance according to the location pressed on the sensor. With this information at hand, I then came up with my first idea of making a two-person game with three LEDS and two sensors. The general idea of the game was that the program would randomly light up a colour and both users would compete by trying to match the program’s colour by using their soft potentiometers. The user that matched the colour correctly would win, and then the game would be reset.

For the elaboration of this game, I wrote two sets of code. The first one would code for the colour randomizer, and the second one would code for the analog inputs of the two users according to the soft potentiometer. Once these codes were done, I would then combine both of them and write the game logic. Or at least this was the plan.

 

An unforeseen difficulty arose when considering the colours that would be part of the game. The code I had written with the help of the SparkFun kit allowed for an endless possibility of colours, which would function, but would make the colour matching almost impossible for the users. Thus, I had to manually set out the colours that would be in play for the game so it would actually be able to be won. For this, I chose five basic colours with simple RGB values (0,255,0;255,255,0,etc.). The second part of the challenge was randomizing the program’s choices. For this, I made a two-dimensional array (or list) and made the program choose a random index from that array, which would then be represented as colours. Here is the final code I wrote for the random colour generator:

Continue reading “Assignment #5: So many changes, end result: chameleon family”

Response #4: Making Interactive Art / Physical Computing’s Greatest Hits

Interactive art is collaborative; it’s a conversation held between artists and viewers, a dynamic piece that changes according to other’s reactions to it. These are the main claims made in “Making Interactive Art: Set the Stage, Then Shut Up and Listen”, a reading that elaborates on the essence of interactive art. According to tigoe, an interactive installation is not a piece where artists explicitly command others on what to do and how to do it. Instead, it provides with the adequate number of hints that are subtle yet distinguishable enough as to imply the possibilities and boundaries of what can be done. I really like the author’s analogy with a conversation or an instrument, in which the artist builds the setting, allows space for the audience to listen, process it, and then reacts to what is present. Such situations emphasize the crucial nature of interactive installations: the dynamism present due to the variety of responses. In such works, no outcome repeats itself, allowing for a huge space of creativity and innovation that can only ensue with both the audience’s and the artists’ collaboration. With the examples provided on the next article regarding “Physical Computing’s Greatest Hits”, such elements are indeed evident. Although some installations include recurring themes or ideas, each artist’s representation of it is different enough as to allow for many different outcomes. For instance, there could be several pieces revolving around the concept of creating music, but the way people can do so, by choosing different tones, volumes, and rhythms through different actions, allows for enough space as to have different outcomes. Out of the pieces presented in the article, the ones that stood out to me the most were those that allowed for people to create music, as it allowed for the stimulation of almost all the senses.   After doing these readings, I am gonna try to shift the method I take when doing our class assignments. Before, I would usually think about the meaning I wanted to evoke and then create a piece that would allow for others to experience or elaborate on it. Now, I am planning to let my imagination flow and leave space for various interpretations and reactions.This new mentality would also grant me more freedom when considering different options for my projects.