797
edits
mNo edit summary |
mNo edit summary |
||
Line 5: | Line 5: | ||
For my project I want to collect the invisible elements (data) that shape the natural atmosphere on my walks and visualize them artistically. | For my project I want to collect the invisible elements (data) that shape the natural atmosphere on my walks and visualize them artistically. | ||
On the route, light, air quality, temperature | On the route, light, air quality, temperature and pulse are measured every minute using an Arduino and sensors. These are stored via an SD card and read out with a code. | ||
The time and route are stored using a tracking app.The data determines the parameters of the subsequent image design. | |||
For transport, a "rack" is built that attaches the breadboard to the body. | |||
#include <SPI.h> //including SDcard | |||
#include <SD.h> | #include <SD.h> | ||
#include <math.h> //including for temperature calculation | #include <math.h> //including for temperature calculation | ||
File myFile; //directing data to file | |||
void setup() { | void setup() { | ||
Serial.begin(9600); //starting comunication with arduino | |||
while (!Serial) { | while (!Serial) { | ||
; | ; | ||
} | } | ||
Serial.print("Initializing SD card..."); //initializing the SD card | |||
if (!SD.begin(10)) { | if (!SD.begin(10)) { | ||
Serial.println("initialization failed!"); // signal if connection failed | Serial.println("initialization failed!"); // signal if connection failed | ||
while (1); | while (1); | ||
} | } | ||
Serial.println("initialization done."); // signal if connection succeded | Serial.println("initialization done."); // signal if connection succeded | ||
myFile = SD.open("test.txt", FILE_WRITE); //naming file | myFile = SD.open("test.txt", FILE_WRITE); //naming file | ||
if (myFile) { | |||
if (myFile) { | |||
Serial.print("Writing to test.txt..."); | Serial.print("Writing to test.txt..."); | ||
myFile.println ("Spaziergang"); //naming the section of the file, date, place, number of walk | myFile.println ("Spaziergang"); //naming the section of the file, date, place, number of walk | ||
myFile.close(); | myFile.close(); | ||
Serial.println("done."); | Serial.println("done."); | ||
} | } | ||
else { | else { | ||
Line 46: | Line 42: | ||
if (myFile) { | if (myFile) { | ||
//collect incoming data from sensors | //collect incoming data from sensors | ||
//light | //light | ||
Serial.print("Writing to test.txt..."); | Serial.print("Writing to test.txt..."); | ||
Line 52: | Line 47: | ||
myFile.print( "Licht: "); | myFile.print( "Licht: "); | ||
myFile.println(light); | myFile.println(light); | ||
//temperature | //temperature | ||
myFile.print ("Temperatur: "); | myFile.print ("Temperatur: "); | ||
Line 59: | Line 53: | ||
double r=(5-fenya)/fenya*4700; | double r=(5-fenya)/fenya*4700; | ||
myFile.println( 1/( log(r/10000) /3950 + 1/(25+273.15))-273.15); | myFile.println( 1/( log(r/10000) /3950 + 1/(25+273.15))-273.15); | ||
// airquality | |||
// airquality | |||
int gas = analogRead(A3); | int gas = analogRead(A3); | ||
myFile.print( "Gas: "); | myFile.print( "Gas: "); | ||
myFile.println(gas, DEC); | myFile.println(gas, DEC); | ||
//pulse | //pulse | ||
int pulse = analogRead(A2); | int pulse = analogRead(A2); | ||
myFile.print( "Pulse: "); | myFile.print( "Pulse: "); | ||
myFile.println(pulse); | myFile.println(pulse); | ||
delay(60000); //collect data every minute | |||
// close the file: | // close the file: | ||
myFile.close(); | myFile.close(); | ||
Serial.println("Sensor.geschrieben."); | Serial.println("Sensor.geschrieben."); | ||
} | } | ||
else { | else { | ||
Line 82: | Line 71: | ||
} | } | ||
} | } | ||
[[File:Screenshot (48).png|400px]] | |||
After each walk the collected Data will be read out and | After each walk the collected Data will be read out and acryl painted onto a cardboardcanvas. | ||
*Time/Duration= Size of the canvas | *Time/Duration= Size of the canvas | ||
*Route= Shape of the line | *Route= Shape of the line |
edits