Betulpeker (talk | contribs) No edit summary |
Betulpeker (talk | contribs) No edit summary |
||
Line 55: | Line 55: | ||
<source style="border:none; height:650px; overflow:scroll;" lang="c" line start="55" highlight="4"> | <source style="border:none; height:650px; overflow:scroll;" lang="c" line start="55" highlight="4"> | ||
import processing.serial.*; | import processing.serial.*; | ||
Serial myPort; | Serial myPort; | ||
String incomingData = null; | String incomingData = null; | ||
float rawSensorData = 0; | float rawSensorData = 0; | ||
boolean buttonPressed; | boolean buttonPressed; | ||
boolean pastButtonData = false, currentButtonData = false; | boolean pastButtonData = false, currentButtonData = false; | ||
Line 65: | Line 64: | ||
//tıme and date | //tıme and date | ||
int h,m,s; | int h,m,s; | ||
String dataName = "positions2601"; | String dataName = "positions2601"; | ||
String folderName = "folder01"; | String folderName = "folder01"; | ||
int imgCounter = 0; | int imgCounter = 0; | ||
void setup() { | void setup() { | ||
size(500, 500); | size(500, 500); | ||
String portName = Serial.list()[2]; | String portName = Serial.list()[2]; | ||
myPort = new Serial(this, portName, 9600); | myPort = new Serial(this, portName, 9600); | ||
myPort.bufferUntil('\n'); | myPort.bufferUntil('\n'); | ||
background (255); | background (255); | ||
output = createWriter("/Users/machd/Desktop/speculative atmospheres II : final/"+folderName+"/"+dataName+".txt"); | output = createWriter("/Users/machd/Desktop/speculative atmospheres II : final/"+folderName+"/"+dataName+".txt"); | ||
} | } | ||
Line 95: | Line 94: | ||
// it allows you to use the incoming data in the draw() function, you do not need to change this. | // it allows you to use the incoming data in the draw() function, you do not need to change this. | ||
void serialEvent(Serial myPort) { | void serialEvent(Serial myPort) { | ||
incomingData = myPort.readString(); | incomingData = myPort.readString(); | ||
r = float(trim(incomingData.split(" ")[0])); | r = float(trim(incomingData.split(" ")[0])); | ||
g = float(trim(incomingData.split(" ")[1])); | g = float(trim(incomingData.split(" ")[1])); | ||
Line 112: | Line 111: | ||
} | } | ||
//rawSensorData = float(trim(incomingData)); | //rawSensorData = float(trim(incomingData)); | ||
//println (rawSensorData); | //println (rawSensorData); | ||
println (incomingData); | println (incomingData); | ||
myPort.clear(); | myPort.clear(); | ||
pastButtonData = currentButtonData; | pastButtonData = currentButtonData; | ||
} | } | ||
void getTime(){ | void getTime(){ | ||
h=hour(); | h=hour(); | ||
m=minute(); | m=minute(); | ||
Line 126: | Line 125: | ||
//println(h,m,s); | //println(h,m,s); | ||
String time = str(h)+":"+str(m)+":"+str(s)+ "-" + str(buttonPressed); | String time = str(h)+":"+str(m)+":"+str(s)+ "-" + str(buttonPressed); | ||
} | } | ||
Revision as of 15:06, 8 February 2022
+ Experiment I, processing + arduino File:exp_1_processing.MP4
+ Experiment II, photointerrupter
+Project & Concept:
Painting Morning Walks
+Keywords:
+walking +routine +pigment +collecting +archive +human-nature relationships +connection to nature
Is there a possibility that the activities or habits we do in our daily life can turn into meaningful data?
What do we encounter when this data is collected from nature with the digital method and transformed into an art practice with the traditional method?
Collecting pieces from nature is a common activity among people of all ages. In my collecting experience for the project, I realized that nature and natural pigments were the essences of art and aesthetics. As each sample from Ilm Park enters the collection, it is labeled with a corresponding number (according to the order of discovery). In a notebook, I recorded where the leaves and other pieces are coming from.
I have been going for a walk to Ilm Park in the mornings since I moved to Weimar (April 2021). During these walks, I realised that I had collected dry branches, leaves and lichen pieces, dry moss etc. that had fallen to the ground from different parts of the Park and brought them home with me. As my collection grows more and more I realised that the way they got together created a completely aesthetic image. I noticed that the combination of these parts creates quite aesthetically and holistically meaningful gatherings. I wanted to create a Digital Color Archive of my walks in the Ilm park with custom shades that belong to leaves and other objects.
+Method: An Arduino with a color sensor records the data and this data (variety of pigments) will be used to paint morning walks at Ilm Park. A color will be archived while walking every morning on the specific route determined in the park.
import processing.serial.*;
Serial myPort;
String incomingData = null;
float rawSensorData = 0;
boolean buttonPressed;
boolean pastButtonData = false, currentButtonData = false;
PrintWriter output;
//tıme and date
int h,m,s;
String dataName = "positions2601";
String folderName = "folder01";
int imgCounter = 0;
void setup() {
size(500, 500);
String portName = Serial.list()[2];
myPort = new Serial(this, portName, 9600);
myPort.bufferUntil('\n');
background (255);
output = createWriter("/Users/machd/Desktop/speculative atmospheres II : final/"+folderName+"/"+dataName+".txt");
}
void draw() {
//*** experiment here to visualize your sensor data!
//*** use the variable – rawSensorData – to change things according to sensor changes.
// call function time
getTime();
// for example:
//float mappedData = map (rawSensorData, 0, 1023, 0, 255);
background (r,g,b);
}
// this is the serial function that runs constantly in the background of your program
// it allows you to use the incoming data in the draw() function, you do not need to change this.
void serialEvent(Serial myPort) {
incomingData = myPort.readString();
r = float(trim(incomingData.split(" ")[0]));
g = float(trim(incomingData.split(" ")[1]));
b = float(trim(incomingData.split(" ")[2]));
buttonPressed = boolean(int(trim(incomingData.split(" ")[3])));
currentButtonData = buttonPressed;
if(pastButtonData == true && currentButtonData == false) {
// Wrıte to fıle the current values
String time = str(h)+":"+str(m)+":"+str(s);
output.println(r + ":" + g + ":" + b + " Time:" + time);
output.flush();
// Save an ımage of the current color
save("/Users/machd/Desktop/speculative atmospheres II : final/" + folderName +"/"+ dataName +"_" +imgCounter +".jpg");
save("/Users/machd/Desktop/speculative atmospheres II : final/" + folderName +"/"+ dataName + "_" +imgCounter + ".png");
imgCounter = imgCounter + 1;
}
//rawSensorData = float(trim(incomingData));
//println (rawSensorData);
println (incomingData);
myPort.clear();
pastButtonData = currentButtonData;
}
void getTime(){
h=hour();
m=minute();
s=second();
//println(h,m,s);
String time = str(h)+":"+str(m)+":"+str(s)+ "-" + str(buttonPressed);
}
void stop() {
output.close();
}
/*
HELP: FINDING THE CORRECT USB PORT
if you can not find your arduino USB port, make a new file and add this code:
* CODE START *
import processing.serial.*;
// List all the available serial ports
printArray(Serial.list());
* CODE END *
It will print out a list of all your USB connections.
Find the [ ] number for your Arduino Port and include it in line 8 of this code.
*/
+Black Box
A Black Box is used when scanning colors. This black box is a design with openings at some specific and certain corners that also only make sense when used together with the RGB color sensor.
+ beginning and process