Week 1
Minor Makerslab
Week 3
Week 4
Week 5
Week 2
Duy-Linh Pham
Week 6
Week 7
Unlearning Manifesto
Zines
Week 8-10
Arduino Code
void setup() {
Serial.begin(9600);
delay(500);
pinMode(D1, OUTPUT); // Trigger distance sensor
pinMode(D2, INPUT); // Echo distance sensor
}

// Variable for the time between the sensor and the object
long duration = 0;
// Variable for the distance between the sensor and the object
int distance = 0;
// Variable to remember the last measured distance
int lastDistance = 0;

void loop() {
// Code from: http://www.instructables.com/id/Simple-Arduino-and-HC-SR04-Example/
// Trigger will be turned off before starting measuring
digitalWrite(D1, LOW);
delayMicroseconds(2);
// Trigger will be turned on for 10 micro seconds
digitalWrite(D1, HIGH);
delayMicroseconds(10);
// Trigger will be turned off
digitalWrite(D1, LOW);
// Reads the distance in time
duration = pulseIn(D2, HIGH);
// Calculate the time to distance in cm
distance = (duration/2) / 29.1;

Serial.print("Distance is: ");
Serial.print(lastDistance);
Serial.println(" cm");

// Update the last measured distance to the variable 'distance'
lastDistance = distance;
Serial.write(lastDistance);
delay(1500);
}
Kick-off
Plotting & Mapping
Critical Making
Collecting & Storytelling
Electronics & Open Design
Cultural interfaces
Self-directed projects
With the skills attained in week 6, use an analog or digital sensor to capture any subjective data (e.g. responses to a question, the distance of peoples preferred personal space, stress levels, ...) and visualize this data in a meaningful way using Processing.
Assignment for week 7
After learning the basics of Processing from Moritz during his workshop, I started to find some inspiration on YouTube by watching different videos on Processing. I then landed on this video about creating computer art, using mathematic equations to make an animation. The video explained exactly what had to be done, so I only had to connect the data and modify just a bit of the code.
Process
Video about computer art and how to make it
Processing Code
import processing.serial.*;

Serial myPort;
int lines = 10;
int distance;
int[] nums = {};
float t;

void setup(){
background(color(29,29,27));
size(500,500);
String portName = "/dev/tty.SLAB_USBtoUART";
myPort = new Serial(this, portName, 9600);

}

void draw() {
background(color(29,29,27));
text("How focused are you?", 25, 25);
text("Distance from screen:", 170, 25);
text(distance, 300,25);
text("cm", 320,25);
translate(width/2, height/2);
for (int i = 0; i < lines; i++){
line (x1(t + i), y1(t + i), x2(t + i), y2(t + i));
}

if (distance > 25) {
t+=0.7;
stroke(color(255,255,255));
strokeWeight(3);
}

if (distance < 25) {
t+=0.2;
stroke(color(253,230,255));
strokeWeight(1);
}
println(t);
println(distance);
}

float x1(float t){
return sin(t / 10) * 100 + sin(t / 5) * 20;
}

float y1(float t){
return cos(t / 10) * 100;
}

float x2(float t){
return sin(t / 10) * 200+ sin(t) * 2;
}

float y2(float t){
return cos(t / 20) * 200 + cos(t / 12) * 20;
}

void serialEvent(Serial myPort) {
}

Final result
Collaborative Learning
This week I only watched YouTube videos, this got me through the whole week.

Maker Skills & Attitude
- Processing
- Connect data (from Arduino) to Processing
Learning objectives