Week 10 Light Play – Shaikha Alkaabi

Inspiration:

Fidget Cube Blue-gray/Black

The inspiration for this code setup comes from the interactive and tactile nature of fidget toys, which are designed to engage the senses through hands-on manipulation. Just as fidget toys provide sensory feedback through various textures and movements to captivate attention, this Arduino project uses buttons and variable light settings to create a dynamic interaction. Users can physically alter the brightness of LEDs or toggle them on and off, mirroring the satisfying and immediate response found in fidget toys, making the learning process both fun and engaging.

Video:

Code:

const int led0 = 3; 
const int led1 = 5; 
const int photoResistor = A1; 
const int potentiometer = A0; 
const int buttonPin = 2; 

void setup() {
  Serial.begin(9600);
  pinMode(led0, OUTPUT);
  pinMode(led1, OUTPUT);
  pinMode(buttonPin, INPUT); // sets the button as an input device
}

void loop() {
  int lightValue = analogRead(photoResistor);
  int potValue = analogRead(potentiometer);
  int delayTime = map(potValue, 0, 1023, 50, 1000); 
  int buttonState = digitalRead(buttonPin);

  Serial.print("Light Value: ");
  Serial.println(lightValue);

  // Analog control of red LED using potentiometer
  int brightness = map(potValue, 0, 1023, 0, 255); 
  analogWrite(led0, brightness);

  // Digital control of green LED using a button
  if (buttonState == HIGH) {
    digitalWrite(led1, HIGH);
  } else {
    digitalWrite(led1, LOW);
  }

  // Additional feature using the photoresistor to change the behavior based on light
  if (lightValue < 300) {
    // When light levels are low, flash the green LED rapidly.
    digitalWrite(led1, HIGH);
    delay(100); // Short delay for rapid flash
    digitalWrite(led1, LOW);
    delay(100); // Continue rapid flash
  }
}

The code controls two LEDs based on inputs from a combination of analog and digital sensors, resulting in an interactive and dynamic output that depends on environmental conditions and user interaction.

  1. Red LED (Analog Control): The brightness of the red LED is directly controlled by a potentiometer. As the user adjusts the potentiometer, the red LED’s brightness varies smoothly from completely off to fully bright. This provides a visual representation of the analog input value, allowing users to see a direct correlation between the potentiometer’s position and the LED’s intensity.
  2. Green LED (Digital Control): The state of the green LED is controlled by a photoseisitor. Pressing photoresistor  turns the LED on, and releasing it turns the LED off. This simple binary control mimics typical digital behaviors in electronics, where a switch controls a circuit’s on/off state.
  3. Additional Behavior with Photoresistor: When it gets dark, the green LED automatically starts flashing rapidly to signal a change in light conditions, overriding the button control.

Assignment #10 – Reading Response – Less Rules More Art

In a sense, all art is interactive. The typical definition given to «interactive» is one that we have discussed in previous readings. As Chris Crawford had mentioned in «The Art of Interactive Design», he believes that interactive art is interactive when and only when both entities listen, think, and speak. Similarly, this is what the author of Making Interactive Art: Set the Stage, Then Shut Up and Listen» points to. The key here is to create a conversation, a dialogue between the artist and the viewer. When the artist over-interprets their own work, they force the viewer to listen and think in a certain way, without letting them speak.
In philosophy of art, what makes art different from other, technical, disciplines is that the process is part of the art. There are no pre-imposed rules to create art – the artist just creates as they go. This is where the place of the spectator is important. When there are no rules imposed, it means that the final result is never determined in advance. In that case, the whole process of creating an artwork becomes the artwork. The result becomes influenced by the interaction with the audience. And, even if there isn’t a visual shift after the audience’s reaction, it is the act of listening to your audience and letting them think and speak for themselves that conceptually alters the course of the artwork.

reading response Making Interactive Art/Physical Computing’s

Reading about interactive art in “Physical Computing’s Greatest Hits and Misses” and “Making Interactive Art: Set the Stage, Then Shut Up and Listen” felt like peeking behind the curtain of a magic show. It made me ponder the fascinating dance between the artist, the artwork, and us, the audience, especially when technology joins the party.
One big question that popped into my head was: can an artist ever truly be the puppet master in this interactive playground? I mean, the moment you invite participation, you’re kind of handing over the reins, right? It’s like setting up a stage for improv – you provide the props and the backdrop, but the actors, well, they bring the story to life in their own unique way. And that’s pretty darn exciting, this unpredictability that makes each experience unique.
“Making Interactive Art” really struck a chord with me when it talked about setting the stage and then taking a step back. It’s like the artist is saying, “Here’s the world I’ve built, now come explore and make it your own.” This reminds me of those cool performance art pieces or happenings, where the lines between performer and audience blur, and everyone becomes part of the art. It’s all about embracing the unexpected, the happy accidents that make life (and art) so interesting.
There was this one bit in “Physical Computing’s Greatest Hits and Misses” that made me pause. It talked about how getting lost in fancy technology can actually be a trap. It reminded me that the heart of interactive art isn’t about gadgets and gizmos, it’s about the human connection, the emotions and thoughts it evokes. Like, a cool light show is fun and all, but if it doesn’t make you feel something, think something, then is it really art?
These readings have made me realize that the artist in interactive art is more like a gardener than a dictator. They plant the seeds, nurture the soil, but ultimately, it’s up to us, the audience, to help the garden grow. And that’s the beauty of it, this collaborative spirit that makes interactive art feel so alive, so human.
Now, I’m curious to see how artists can create these interactive worlds without being too controlling. It’s like finding that sweet spot where the artist’s vision meets the audience’s imagination, and together, they create something truly magical.

Reading Reflection – Week #10 by Marcos Hernández

In this post, you will find each individual reading reflection assigned for week 10. These reflections will be mostly based on my experiences, so actual discussion on the contents of the writing will be somewhat limited since I feel that it would be redundant to summarize what is there.

Making Interactive Art: Set the Stage, Then Shut Up and Listen

Generally, I associate the term Interactive Art with video games. According to the article, we are not supposed to readily give interpretation of our own works due to possibly adding bias and making boring the interactive experience for others. For example, in mysterious abstract video games, I have seen authors avoid giving full explanations to seemingly inconclusive questions in order to keep conversations, theories, and engagement alive. In a confusing title such as OFF (Mortis Ghost, 2008) the world that it presented is full of mysterious elements. At first sight is difficult to give an explanation to, nevertheless it invites the player to give its own reasoning to this interactive art.

As for other interactive art mediums, I often found myself walking on the corridors of the Arts Center building to see some interesting digital arts, such as a screen that portrays me in symbols. There are many other examples, but what they have in common is that they apply the concept of “show, don’t tell” that I really love about video games, since it leaves the spectator/player alone with the interactive art. In other words, it is a personalized experience: I will find an interactive digitalized portrait of myself super thought-provoking, while a friend could just find it funny. Different experiences, but there is not a fixated idea due to not having the author directly explain it to us as to why the existence of the created interactive art.

Physical Computing’s Greatest Hits (and misses)

During my time as a child, I have seen a correlation between success and devices that challenge pre-established formulas. For example, in today’s world (today as at the time I am writing this) computer mouses are generally used due to facilitating the computer experience, it facilitated it so much that the entire computer GUI landscape adapted to it. It acts as a “third hand” that gets materialized into the digital world, where if you want to “grab a file”, you just have to hold the mouse with one of your fingers in order to simulate the action of grabbing. It was a great hit, but what about other technologies that try to revolutionize or seek general fun?

I would like to imagine a James Bond like hand watch as a replacement for the watches we have now, such as the Apple Watch. One finds (small) pleasure in using the watch to quickly watch the time and timely arrange the next activities to do, as well as it also looks and feels nice to have due to the possible elegance it possesses. But what about making it a very curious device, such as the one that James Bond has? Imagine this: you have a clock that looks impressive, thus it is pleasurable to wear, but also has a laser, camera, and magnetism included on it. Yes, one can easily argue that this idea is already done to death in many series and movies as an inspiration, but still, one can find other workarounds to this theoretical watch; a remix act. So, instead of creating an actual James Bond like that shoots lasers, what about throwing confetti in miniature? One could find pleasure in annoying friends and family with the functionality.

In conclusion, I found this article curious as I noticed some patterns in successful products, such as the indirectly mentioned Dance Dance Revolution Dance Pads in the writing. The world of physically interactive art has its market, because it is pleasurable and fun to experiment with items one might never be seen before.

Assignment #6 – Switchable Lights by Marcos Hernández

Introduction

For this week, I tried to imagine something complex to do, but due to creative bankruptcy, I could not imagine any interesting mechanisms for this Arduino. Although, I still wanted to experiment with what we have learned in class so far.

When we were experimenting with the photoresistor, I was curious to see what kind of patterns I could make with the use of the device, LEDs, and the mapping function. Thus, I came with the idea of doing a volume meter inspired light detector.

Figure #1: Arduino made in person.

Materials

    • 7 330-ohm resistors.
    • 2 green LED lights.
    • 1 yellow LED light.
    • 1 red LED light.
    • 1 blue LED light.
    • A breadboard.
    • 8 red jumper wires (due to being low in red jumper wires, three are yellow).
    • 7 black jumper wires (again, due to being low, 2 are white).
    • 2 blue jumper wires.
    • An Arduino board with, 5V, GND, analog and digital output and input.
    • A slideswitch.

Implementation & Usage

Once all the materials are set up like in the schematic and the Arduino is powered, the user can do either of the following according if the slideswitch is ON or OFF:

1. If the slideswitch is ON, a blue LED will indicate this state. In this mode, if a light source is redirected to the photoresistor, the LEDs will turn on, like a volume meter, depending on the strength of the source.

2. If the slideswitch is OFF, the blue LED light will be off, indicating this state. In this mode, a non-interactable sequence where each LED light will be displayed, where they will be turning ON and OFF in a 0.5 second basis.

Both modes can be interrupted at any time.

Schematics

Figure #2: Schematic #1 made in Tinkercad.

Figure #3: Schematic #2 made in Tinkercad.

Code

For the coding, I used the blocks GUI from Tinkercad, and then transform it into code to change it according to my necessities, as well as add some comments to it to further explain some functionalities.

//We will only use two variables for this Arduino set up:
//Brightness is to receive the analog values from the photoresistor, to use to turn ON the LEDs.
//Switchstate will alternate between states depending on the analog valaue received.

int brightness = 0;
int switchstate = 0;

void setup()
{

  // Preparing the Arduino and variables initialization.
  pinMode(A0, INPUT);
  pinMode(A1, INPUT);
  Serial.begin(9600);
  pinMode(3, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(12, OUTPUT);

  brightness = 0;
  switchstate = 0;
}

void loop()
{
  switchstate = analogRead(A0);

  // According to the amount of light received by the photoresistor, it will turn on the LEDs. For example,
  //if the light source is too strong, all LEDs will turn on, if it is too low, either 1 or 2 will be ON.

  if (switchstate > 1013) {
    digitalWrite(12, HIGH); // Blue LED indicates light mode.
    brightness = analogRead(A1); //Receive values from the photoresistor.
    Serial.println(brightness); //and print it to serial.
    if (brightness > 100) {
      analogWrite(3, map(brightness, 0, 1023, 0, 300)); //First green LED will be turn on and its intensity will depend on the intensity of the light source. Also, we map the values received since if it is too high, then it will basically loop; mapping makes sure that it always states in a range.
      if (brightness > 200) {
        analogWrite(5, map(brightness, 0, 1023, 0, 300)); //Second green LED will be turn on and its intensity will depend on the intensity of the light source. The rest is the same.
        if (brightness > 300) {
          analogWrite(6, map(brightness, 0, 1023, 0, 300));
          if (brightness > 400) {
            analogWrite(9, map(brightness, 0, 1023, 0, 300));
          } else {
            digitalWrite(9, LOW);
          }
        } else {
          digitalWrite(6, LOW);
        }
      } else {
        digitalWrite(5, LOW);
      }
    } else {
      digitalWrite(3, LOW); //If it fails to meet the requirement, the it will turn OFF without exceptions. It is the same for the rest of LEDs.
    }


  } else {
    // Each LED gets turn on and off in order.
    digitalWrite(12, LOW); // Blue LED gets shut down.
    digitalWrite(3, HIGH);
    delay(500); // Wait for 500 millisecond(s)
    digitalWrite(3, LOW);
    digitalWrite(5, HIGH);
    delay(500); 
    digitalWrite(5, LOW);
    digitalWrite(6, HIGH);
    delay(500); 
    digitalWrite(6, LOW);
    digitalWrite(9, HIGH);
    delay(500); 
    digitalWrite(9, LOW);
    Serial.println(switchstate);
  }
}

Showcase

In this video, I show how the Arduino looks and operates. Please keep in mind that the color of some jumper wires had to be mixed up (at least strategically) due to material constrains, in order to still convey the positive and negative connections.

Challenges

The biggest challenge in this Arduino was, actually, making the photoresistor to work. The reason of this difficulty was that I had forgotten how to set up the photoresistor properly, even though we were taught how to do so in class. Although, with a YouTube video and quick review of the slides, I was able to pick up again what I needed to do and not question myself why I was getting a consistent analog value of 1024 from my photoresistor.

Reflection

I am feeling that I am going a bit bankrupt creatively. I do admit that this Arduino took me time to develop, but the many ideas I had in my mind are still not able to come into fruition. Likewise, I personally feel that this is like the previous scenario in the first half of this semester, where I was mostly experimenting with the provided tools in order to have a greater idea of what is possible to do. It is likely it will happen in this case, but still, I wish I could come with more ideas to develop more curious devices.

Nevertheless, I did learn something new from this Arduino, like how to effectively map some values and how to set up properly a device (ignoring the selection of colors of the jumper-wires of course) to capture values from two points: the photoresistor and the slideswitch.

 

Thanks for reading this and have a happy day.

 

Week 10 – To artists who are not sure

 

I although I find that the subject of “Making Interactive Art: Set the Stage, Then Shut Up and Listen” is well meaning, it think that to an extent, it misses the reason why some artists interpret their own interactive works.

Coming from a mainly computer science background, its hard for me to see my programs being misused in a way that I did not intend. To me, this feels like failure, which in a way it is, as I have failed to design a program which accurately and correctly executes what it is supposed to. This is why I emphasize with artist who offer interpretation notes beside their work, as they too are hoping that it will be used or viewed in the “right” way, the way that they intended, as a way to prevent their “failure”.

However, the big difference here is that what they are doing is art, and not computer science. In computer science, the focus is often on precision, functionality, and predictability. A program that doesn’t work as intended is considered flawed and needs debugging or refinement.

Art, on the other hand, often thrives on ambiguity, interpretation, and the emotional response it elicits from its audience. Interactive art, especially, invites the audience to engage with it, to become part of the artwork’s evolution and meaning. This inherently means that the artist relinquishes some control over the final outcome.

When an artist provides interpretation notes or guidelines alongside their interactive art, it can be seen as a way to guide the audience’s experience or to share their perspective. However, it’s essential to remember that art is subjective. Each viewer brings their own background, experiences, and emotions to their interpretation of the artwork. This diversity of interpretation can enrich the artwork’s meaning and create a more profound connection between the viewer and the art.

Rather than viewing unintended interactions or interpretations as failures, artists can see them as opportunities for growth, learning, and further exploration of their art’s potential. It can lead to unexpected outcomes that even the artist hadn’t considered, expanding the artwork’s scope and impact.

Week 10 – Double Light Switch

For this assignment, I wanted to make something a bit funny. Thus, I decided to make a light switch powered by light. My idea was simple, point an LED at an LDR, record its readings, and light up another LED at the brightness the LDR recorded.

Unfortunately, after building by circuit, I ran into an issue with the Arduino, where it would not read anything from the IN pins and would not allow me to print anything to the terminal either.

Not to be discouraged, I decided to build the entire circuit in analog.

Had I been able to use the analog IN pins, my code would have looked like this.

// Define the LDR pin
const int ldrPin = A0;
// Define the digital LED pin
const int digitalLedPin = 13;

// Variable to store the LDR value
int ldrValue = 0;

void setup() {
  Serial.begin(9600);
  pinMode(digitalLedPin, OUTPUT);
}

void loop() {
  // Read the analog value from LDR
  ldrValue = analogRead(ldrPin);
  
  // Print the LDR value to Serial Monitor
  Serial.print("LDR Value: ");
  Serial.println(ldrValue);

  // Set the brightness of the digital LED based on the LDR value
  analogWrite(digitalLedPin, map(ldrValue, 0, 1023, 0, 255));

  // Add a delay to avoid flooding the Serial Monitor with data
  delay(500);
}

Additionally, I noticed that the who design does not work very in lit environments, so I wanted to add a function which would calculate the average light in a room, and set the output LED to 0, so that a change in lighting from the other LED would be more noticeable. This, however, is impossible to do with my understanding of analog circuits.

Week 10 Production

For this week’s assignment, I used potentiometer as an analogue sensor, and a tactile button as a digital sensor (switch) and two LEDs. For the LED that is controlled by the tactile button, I made it so that it blinks twice and the potentiometer for brightness control.

Code:

int led = 11;
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  Serial.begin(9600);
  pinMode(led, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(A2, INPUT);
}

// the loop function runs over and over again forever
void loop() {
  int button1State = digitalRead(A2);
  int sensorValue = analogRead(A1);
  
  Serial.println(sensorValue);

  analogWrite(led, sensorValue/4);
  delay(30);

  if (button1State == HIGH) {
    digitalWrite(8, HIGH);
    delay(1000);
    digitalWrite(8, LOW);
    delay(1000);
    digitalWrite(8, HIGH);
    delay(1000);
    digitalWrite(8, LOW);
    delay(1000);

  } else if (button1State == LOW){
    digitalWrite(8, LOW);
  }

}

Video:

Week 10 Exploring – Khalifa Alshamsi

Concept:

This project’s concept is to utilize a combination of hardware components (Arduino, ultrasonic sensor, LEDs, and a slide switch) to create an interactive system that responds to physical proximity and manual control.

Setup:

Video:

Code:

const int ledPin = 8;           // LED connected to digital pin 8
const int trigPin = 12;         // Ultrasonic Sensor Trigger pin
const int echoPin = 11;         // Ultrasonic Sensor Echo pin
const int ledPin1 = 9;          // First LED pin (PWM capable)
const int ledPin2 = 4;          // Second LED pin
const int switchPin = 2;        // Slide switch pin
bool ledEnabled = false;        // State to keep track of LEDs response state

long duration;                  // Variable to store the time it takes for the echo to return
float distance;                 // Variable to store the calculated distance

void setup() {
  pinMode(trigPin, OUTPUT);     // Sets the trigPin as an Output
  pinMode(echoPin, INPUT);      // Sets the echoPin as an Input
  pinMode(ledPin1, OUTPUT);     // Sets the first LED pin as an Output
  pinMode(ledPin2, OUTPUT);     // Sets the second LED pin as an Output
  pinMode(switchPin, INPUT_PULLUP); // Sets the switchPin as an Input with internal pull-up resistor
  Serial.begin(9600);           // Start serial communication at 9600 baud
}

void loop() {
  // Read the state of the switch
  ledEnabled = digitalRead(switchPin) == LOW; // Check if switch is active

  // Measure the distance from the ultrasonic sensor
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = duration * 0.034 / 2; // Speed of sound wave divided by 2 (go and return)
  Serial.print("Distance: ");
  Serial.println(distance);

  if (ledEnabled) {
    // Pulse the first LED based on distance
    int brightness = map(distance, 0, 200, 255, 10);
    brightness = constrain(brightness, 10, 255);
    analogWrite(ledPin1, brightness);

    // Toggle the second LED based on distance threshold
    digitalWrite(ledPin2, distance < 30 ? HIGH : LOW);
  } else {
    // Turn off LEDs when switch is off
    analogWrite(ledPin1, 0);
    digitalWrite(ledPin2, LOW);
  }
  delay(100);  // Short delay to stabilize loop and reduce sensor noise
}

Reflection:

Reflecting on this project, I’ve realized it was a substantial learning experience and a test of my problem-solving skills. Integrating various components—Arduino, ultrasonic sensor, LEDs, and a slide switch—presented several challenges that enhanced my understanding of electronic systems and their programming. One of the main difficulties encountered was ensuring stable and reliable readings from the ultrasonic sensor. Interferences occasionally led to erratic LED behaviors, requiring adjustments in the placement and coding to filter out spurious signals effectively. Another challenge was debouncing the slide switch to achieve consistent results, underscoring software stability’s importance in hardware projects. Managing multiple outputs based on input from a single sensor also pushed me to think critically about how different components interact within an embedded system. This project bolstered my technical skills and deepened my appreciation for the meticulous detail required in electronic design and the creative potential of combining simple elements to produce complex interactions.

Reading Response – Making Interactive Art: Set the Stage, Then Shut Up and Listen

This idea of not over-explaining your interactive artworks really struck a chord with me. I’ve definitely been guilty of that in the past – spelling out too many specifics about what different elements “mean” and how people are “supposed” to interact with them. But as the author points out, doing that pretty much defeats the whole purpose. You’re just dictating how the audience should think and experience the piece, instead of leaving room for them to explore and interpret it themselves.

I can vividly remember one interactive installation I saw that fell into this trap. It looked really cool – these conductive surfaces that would trigger light patterns when you touched them. But then the description plaque gave you this long, explicit walkthrough of the precise sequence you “should” follow when engaging with it. It ended up feeling really prescriptive and took away from the sense of curiosity and spontaneous discovery that initially drew me to the work.

The author’s point about interactive art being the “start of a conversation” between the artist and viewer resonated so much. Rather than a static, finished product, it’s meant to be this open-ended exchange where the audience’s live participation and personal perspectives complete the experience. Kind of like a director setting up a premise and suggestions for the actors, but then letting them organically find their own emotional truths within that framework.

Moving forward, I really want to embrace that spirit of intentional ambiguity in my own interactive work. Instead of strictly defining roles and meanings, I should focus on crafting intriguing environments, suggestive arrangements of elements, and potential pathways to explore – but then step back and allow diverse interpretations to emerge organically through self-directed engagement. Creating prompts for personal dialogue rather than dictating conclusions. It’s a shift in mindset, but one I think will lead to much richer, more interactive experiences.