Recitation 9: Digital Fabrication

Recitation Friday!This time, I created a kinetic sculpture using digital fabrication tools.

Step 1: Design

Firstly,I designed two rectangles to create a stand for the kinetic sculpture.The most difficult part was to measure the length and width of the servo.

Then, I drew the moving part as well as the fixed part.Due to the time limit,I did not manage to design a very complex pattern.Instead,I used the rotational repeat and boolean union to create two simple patterns.If I have more time,I will definitely try to design a more interesting pattern.

Step 2: Laser Cut

I uploaded the files to the google file.I also imported the files into the USB flash drive so that the files could be recognized by the Adobe AI in the computer next to the Laser Cutting machine. Later, the fellow from the fabrication lab showed me how to use the Laser Cutting machine and helped me with the settings. Here was the process.

Step 3: Assemble

Lastly,I assembled all the materials to build a kinetic sculpture. One problem I faced was that hollow part on the board was too small so that the servo couldn’t fit in. Hence, I used the art knife to cut off the excess part. Another problem was that the pattern was too big so that the stand would block its movement.Therefore, I could only hold the kinetic sculpture by myself. Besides, I also accelarated the spinning speed of the servo. Here was how it looked. 

Final Project: Essay

Senses

In my opinion, successful artifacts not only bring interesting interactions and experiences, but also provoke thoughts about social issues. For a long time,the disabled people have been ignored by the society.And one of the most obvious examples is that many of China’s blind corridors have problems such as broken or uneven surfaces, bicycles and electric vehicles occupying the blind corridors, etc. Based on these phenomona,I think it is time for us normal people to raise awareness of this problem and to care about the blind.Therefore,the original topic of my design is the disabled ,especially the blind.I want to design a artifact that can let normal people experience the life of the disabled.However,I also do not want to make my design too sad and depressing.Thus,the core idea of my design is to abandon the visuals like the blind and emphasize other senses,especially audios.The main challenge is that whether the artifact will be influential when visuals are not prioritized because most artifacts regard visuals as the most important things.Meanwhile,this is a real salute to the visually impaired people because users can empathize with them during the experiences.Also,it can trigger them to think about the disabled community in society,which is my ultimate purpose for the design.

Just as Ernest Edmonds said,”there are three kinds of engagement:Attracting,sustaining,relating”(Edmonds,12).In the article Art,Interaction and Engagement,he divided interavtive art systems into four situations which were termed”Static”,”Dynamic-Passive”,”Dynamic-Interactive” and “Dynamic-Interactive(Varying).The last two situations are when the works are influenced by the audience and they are closely related to the artifact that I would like to create.He also simplified four kinds of interactive art systems into”Responding,varying,influencing and communicating”(Edmonds,13).From my point of view,interaction means acting with each other ,whether it was the acting between people,computers or between people and computers.More importantly,this was a two-way acting,which meant both sides had to respond to the other’s reactions.Besides,interaction should be something that is playable or subjected to change.

The project that I researched is a VR game called Beat Saber.In the game,the game use two devices that looked like swords to cut the cubes while following the rhythm and the music.Here,the VR device showed the user different cubes as instructions for “hitting”.Then the user make actions based on the instructions.After “hitting” the cubes,new animations on the screens would appear to let the user notice that he had successfully hit the cubes in the game.Through this circulation as well as two-way acting,the user can interact with the VR device and achieve great fun,which fits Ernest’s ideas of”Responding,varying,influencing and communicating”(Edmonds,13).Therefore,I regard it as a successful interactive experience.More importantly,it also inspired me to use audios in my project to promote innovative ideas since the convention tends to focus on visuals.

Hence, my design is to create interaction through senses such as hearing and touch.The narrative is that the user is a blind people,so he needs to rely on his other senses.Also,the user has to cover his or her eyes.Firstly,a box with nine buttons will be present in front of the user.Then the user has to follow the audio instructions to find the only right button to start a game.In the game,the user may encounter situations like being chased by a monster or facing the danger of being hit by cars.Hence,they need to jump front and back or side to side based on the instructions in Processing.Also, pressure sensors will be applied to detect the actions of the users.Addtional task such as audios from 360 degrees may be a new challenge and it may trigger new inspirations of audio artifacts. Box and buttons:Dec.2nd ; Processing and pressure sensor :Dec.4th;other tasks:Dec.6th-Dec.9th

Reference List

1.Edmonds E. Art, Interaction and Engagement. 2011 15th International Conference on Information Visualisation, Information Visualisation (IV), 2011 15th International Conference on. July 2011:451-456. doi:10.1109/IV.2011.73

Final Project: Three Project Proposals

1.Blind

The topic of this design is the disabled ,especially the blind.For a long time,the disabled people have been ignored by the society.And one of the most obvious examples is that many of China’s blind corridors have problems such as broken or uneven surfaces, bicycles and electric vehicles occupying the blind corridors, etc. Based on these phenomona,I think it is time for us normal people to raise awareness of this problem and to care about the blind.Hence,I want to design a artifact that can let normal people experience the life of the disabled.This idea will probably be realized by a device that cover the user’s eyes and all interactions are done by audios and actions. For example,they may hear the complex sounds on the road and have to do actions by following the audio instructions.

2.Light&Beat Sword

This artifact is inspired by an existing VR game called Beat Saber.In the game,the game use two devices that looked like swords to cut the cubes while following the rhythm and the music.Here,the VR device showed the user different cubes as instructions for “hitting”.Then the user make actions based on the instructions.After “hitting” the cubes,new animations on the screens would appear to let the user notice that he had successfully hit the cubes in the game.Based on this,I want to design a Light Sword that can interact with the animations on the monitor,and three forms are listed in the sketch:sequence,blink and sweep.The LEDs on the sword is also a part of the interaction.Techniques like building a switch in the recitation 1,visualizing Neopixel Music in the recitation 7 and examples of receiving multiple values in the Processing are useful for this artifact.

3.Starry Starry Night

This artifact is inspired by the an interactive wall of space inside the Shanghai Planetarium.Once the users do actions,for example waving their arms or shaking their heads,the animations of milky way will start to move and even become blurred sometimes.Also,the movement of animations are based on users’ speed and position of actions.From my point of view,this is a wonderful prototype to work on because it not only provides us with an innovative way of interacting but also has connections with the topic of nature and space.Actually,every creature in nature has their own beauty.However,people in modern societies are too busy to immerse in nature.Hence,I want to design an artifact that can let people feel relaxed while enjoying the beauty of nature:Three potentiometers are set on the Arduino and they are respectively related to x-axis,y-axis and zoom in or zoom out.Through blurring and dynamicizing the animations,users can DIY their final images.Besides,music will probably be take into consideration.

Recitation 8: Serial Communication

Recitation Friday!In this recitation,I would send data from Arduino to Processing and vice versa by using serial communication. 

Task #1:  Make a Processing Etch-A-Sketch

The first step went well.I built the circuit with two potentiometers. Based on the example of SendMultipleValues,I added another variable called sensorValue2 to send the second potentiometer’s serial information to the Processing.Here is the code of Arduino:

#include “SerialRecord.h”

// Change this number to send a different number of values
SerialRecord writer(2);

void setup() {
Serial.begin(9600);
}

void loop() {
int sensorValue = analogRead(A0);
int sensorValue2 = analogRead(A1);

writer[0] = sensorValue;
writer[1]= sensorValue2;
writer.send();

delay(10);
}
 

Just like an Etch-A-Sketch, one potentiometer controlled the circle’s x-axis movement, and the other controlled the circle’s y-axis movement. 

However,when I wanted to change the circles into lines,some problems occurred.

The first problem was that the start point of the line stuck at the top left corner.Then I fixed the problem by substituting the new x position for the old x position.So was the y position.

The second problem was that the track of the lines wasn’t marked.So I put the background setting in void setup rather than void draw.

Here was how users could draw by using the two potentiometers.The code is attached below.

import processing.serial.*;
import osteele.processing.SerialRecord.*;

Serial serialPort;
SerialRecord serialRecord;
float oldx;
float oldy;

void setup() {
   background(0);
  size(500, 500);
 
  String serialPortName = SerialUtils.findArduinoPort();
  serialPort = new Serial(this, serialPortName, 9600);

  // If the Arduino sketch sends a different number of values, modify the number
  // `2` on the next line to match the number of values that it sends.
  serialRecord = new SerialRecord(this, serialPort, 2);
}

void draw() {

  serialRecord.read();
  int value1 = serialRecord.values[0];
  int value2 = serialRecord.values[1];

  float x = map(value1, 0, 1024, 0, width);
  float y = map(value2, 0, 1024, 0, height);
  stroke(255);
  strokeWeight(15);
  line(oldx,oldy,x,y);
  oldx=x;
  oldy=y;
}

Task #2

My pair teammate is Sid.At first,we both worked out how to design the code of the bouncing ball without connecting the motors.

Here was my way of designing the bouncing ball.

int x=50;
int xdirection=1;
void setup() {
  fullScreen();
  background(0);
  
  
}

void draw() {
  background(0);
  circle(x,height/2,50);
  x=x+5*xdirection;
  if (x>width-50||x<50){
    xdirection*=-1;}
  
}

Nevertheless,we did spend some time on the code of spinning the two motors according to the position of the ball.We had problems such as only one motor rotated or the angle of the motor went wrong.Finally,we managed to deal with the problem by revising in the code.After several tests,the motors managed to spin at the right time(when the ball hit the edges) and right angle,just like this:

/*
ReceiveMultipleValues

This sketch repeatedly receives a record that contains a single value, and
uses it to control the builtin LED. The value should be 0 or 1.

This sketch pairs well with the SendSingleValue example from the Processing
SerialRecord library <https://osteele.github.io/Processing_SerialRecord/>.

You can also interact with this sketch from the Serial Monitor. Enter
`100,200` into the text area at the top, and press “Send”. Then enter `!e` to
ask the Arduino to send back the last values it received.

by Oliver Steele, 2020-2022

This example code is in the public domain.
*/

#include “SerialRecord.h”

// Change this number to the number of values you want to receive
SerialRecord reader(1);

#include <Servo.h>

Servo myservo; // create servo object to control a servo
Servo myservo2;

int potpin = A0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin

void setup() {
Serial.begin(9600);
myservo.attach(9);
myservo2.attach(10);
}

void loop() {
reader.read();
//Serial.println(reader[0]);
val = 100;
if (reader[0] > 1420) {
myservo.write(val);
}
else if (reader[0] > 1400){
myservo.write(val – 100);
}
if (reader[0] < 10) {
myservo2.write(val);
}
else {
myservo2.write(val – 100);
}
//delay(20); // reads the value of the potentiometer (value between 0 and 1023) // scale it for use with the servo (value between 0 and 180)
// sets the servo position according to the scaled value
}

Recitation 7: Neopixel Music Visualization

Recitaion Friday!Today,I’m about to use the Neopixel to visualize the music codes in Processing.

Task #1: Test the NeoPixel

Task #2: Use my computer to light up NeoPixels

Here was how I sent values in a Comma Separated Value protocol (CSV) in the Arduino. 

Task #3: Add Music!

For this task,I substituted drum audios for the original music.Later,I changed several settings such as the colors of the circles and background.

Here was how it worked.Also,my code is attached below.

Processing:

import processing.serial.*;
import osteele.processing.SerialRecord.*;

Serial serialPort;
SerialRecord serialRecord;

int W;         //width of the tiles
int NUM = 60;  //amount of pixels
int[] r = new int[NUM]; //red of each tile
int[] g = new int[NUM]; //red of each tile
int[] b = new int[NUM]; //red of each tile

void setup() {
  size(600, 200);
  W = width/NUM;
  
  String serialPortName = SerialUtils.findArduinoPort();
  serialPort = new Serial(this, serialPortName, 9600);
  serialRecord = new SerialRecord(this, serialPort, 4);
  serialRecord.logToCanvas(false);
  rectMode(CENTER);
}

void draw() {
  background(0);
  for (int i=0; i<NUM; i ++) {
    fill(r[i], g[i], b[i]);
    rect(i * W + W/2, height/2, 10, 10);
  }

 if (mousePressed == true) {
    int n = floor(constrain(mouseX/W , 0, NUM-1));

    r[n] = floor(random(255));
    g[n] = floor(random(255));
    b[n] = floor(random(255));

    serialRecord.values[0] = n;     // which pixel we change (0-59)
    serialRecord.values[1] = r[n];  // how much red (0-255)
    serialRecord.values[2] = g[n];  // how much green (0-255)
    serialRecord.values[3] = b[n];  // how much blue (0-255)
    serialRecord.send();            // send it!
  }

}

Arduino:

#include <FastLED.h>
#define NUM_LEDS 30 // How many leds on your strip?
#define DATA_PIN 3
CRGB leds[NUM_LEDS];
void setup() {
  Serial.begin(9600);
  FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}
void loop() {
  if (Serial.available() > 0) {
    char in = Serial.read();
    if (in == ‘R’) {
      // set all LEDs to red on R
      for (int i = 0; i < 30; i=i+1) {
        leds[i] = CRGB(10, 0, 0);
      }
      FastLED.show();
    }
    if (in == ‘G’) {
      // set all LEDs to green on G
      for (int i = 0; i < 30; i=i+1) {
        leds[i] = CRGB(0, 10, 0);
      }
      FastLED.show();
    }
  }
}

Unfortunately,I had spent too much time in the coding of Task 2 so that I didn’t have enough time for further testing in the last step.Still,since I had learnt the basic logic of it and had succeeded in the visualization of one light,I would definitely try to revise and improve the process of visualization in later works.