732
edits
mNo edit summary |
mNo edit summary |
||
(21 intermediate revisions by the same user not shown) | |||
Line 26: | Line 26: | ||
''Code'' | ''Code'' | ||
#include <SPI.h> //including SDcard | #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 | File myFile; //directing data to file | ||
void setup() { | void setup() { | ||
Serial.begin(9600); //starting comunication with arduino | Serial.begin(9600); //starting comunication with arduino | ||
while (!Serial) { | while (!Serial) { | ||
Line 38: | Line 42: | ||
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(" | myFile = SD.open("Spaziergang.txt", FILE_WRITE); //naming file | ||
if (myFile) { | |||
Serial.print("Writing to | if (myFile) { | ||
Serial.print("Writing to Spaziergang.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 { | ||
// if the file didn't open, print an error: | // if the file didn't open, print an error: | ||
Serial.println("error opening Spaziergang.txt"); //signal if opening failed | |||
} | |||
} | } | ||
void loop() { | void loop() { | ||
//if the communication started successfully- | //if the communication started successfully- | ||
myFile = SD.open(" | myFile = SD.open("Spaziergang.txt", FILE_WRITE); | ||
if (myFile) { | if (myFile) { | ||
//collect incoming data from sensors | //collect incoming data from sensors | ||
//light | //light | ||
Serial.print("Writing to Spaziergang.txt..."); | |||
int light = analogRead(A0); | |||
myFile.print( "Licht: "); | myFile.print( "Licht: "); | ||
myFile.println(light); | myFile.println(light); | ||
//temperature | |||
myFile.print ("Temperatur: "); | myFile.print ("Temperatur: "); | ||
double temp=analogRead(A1); | double temp=analogRead(A1); | ||
Line 70: | Line 79: | ||
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 | 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 { | ||
// if the file didn't open, print an error: | // if the file didn't open, print an error: | ||
Serial.println("error opening | Serial.println("error opening Spaziergang.txt"); | ||
} | } | ||
} | } | ||
Line 98: | Line 112: | ||
''Rack / Helmet'' | ''Rack / Helmet'' | ||
[[File:Foto 03.02.22, 17 51 37.jpg|300px]][[File:Foto 03.02.22, 17 55 28.jpg| | [[File:Foto 03.02.22, 17 51 37.jpg|300px]][[File:Foto 03.02.22, 17 55 28.jpg|410px]] | ||
''Data Arduino / SD-Card'' | ''Data Arduino / SD-Card'' | ||
Line 105: | Line 119: | ||
The first minute is not taken into account as the gas sensor needs about 30 seconds to be ready. In the meantime, the helmet is also put on and the route tracking is started. | The first minute is not taken into account as the gas sensor needs about 30 seconds to be ready. In the meantime, the helmet is also put on and the route tracking is started. | ||
Delete collected data from SD-Card to seperate new from old. Copy-Paste into word sheet to make it easier to read and work with. | |||
Line 116: | Line 133: | ||
[[File:Steplength.jpeg|200px]] | [[File:Steplength.jpeg|200px]] | ||
Line 151: | Line 167: | ||
''Walking'' | ''Walking'' | ||
(At the end of the video I included a clip of two police officers beeing filmed for some kind of a TV-Show. Because of this I had to stop walking and restart at another place.) | |||
{{#ev:vimeo|674919770}} | |||
''At home'' | ''At home'' | ||
[[File:SetupForTranslation.jpeg|300px]] | [[File:SetupForTranslation.jpeg|300px]][[File:TranslationWork.jpeg|300px]][[File:coloradjusting.jpeg|300px]][[File:painttttt.jpeg|300px]] | ||
'''Visualition''' | |||
Walk 1 : Weimar City Center, 22.01.2022, 18:35, 36min, 3KM, 100 Steps a Minute | |||
[[File:Route1.jpeg|800px]] | |||
[[File:WalkOne.png|300px]] | |||
[[:File:Spaziergang 22.01.2022 Weimar Innenstadt.pdf]] | |||
Walk 2 : Weimar Ilmpark, 25.01.2022, 14:48, 57min, 4,8KM, 100Steps a Minute | |||
[[File:Route2.jpeg|800px]] | |||
[[File:WalkTwo.png|300px]] | |||
[[:File:Spaziergang 25.01.2022 Weimar Ilmpark.pdf]] | |||
Walk 3 : Weimar West, 01.02.2022,12:12, 65min, 6KM, 100 Steps a Minute | |||
[[File:Route3.jpeg|800px]] | |||
[[File:WalkThree.png|300px]] | [[File:WalkThree.png|300px]] | ||
[[:File:Spaziergang 01.02.2022 Weimar West.pdf]] | |||
Walk 4 : Weimar Kirschbachtal, 17:32, 33min, 2,83KM, 100 Steps a Minute | |||
[[File:Route4.jpeg|800px]] | |||
[[File:WalkFour.png|300px]] | [[File:WalkFour.png|300px]] | ||
[[:File:PDF Spaziergang 02.02.2022 Weimar Kirschbachtal.pdf]] | |||
'''Reflecting''' | '''Reflecting''' | ||
Line 186: | Line 220: | ||
Also, for the type of visualisation (the route line), the input of data, i.e. the change of the line, is too much. 3 sensors would have been enough. The second line seems rather confusing. The effect that space is suggested by a "shadow" is missing. | Also, for the type of visualisation (the route line), the input of data, i.e. the change of the line, is too much. 3 sensors would have been enough. The second line seems rather confusing. The effect that space is suggested by a "shadow" is missing. | ||
Line 244: | Line 279: | ||
[[File:Linearroute.png|200px]] [[File:Anhang 1 (2).jpeg|200px]][[File:razm.jpeg|200px]][[File:rotgelbrauml.jpeg|200px]][[File:Hintergrund.png|200px]][[File:Sketcch.jpeg|200px]][[File:Sketccch.jpeg|200px]][[File:3dcollage.jpeg|200px]][[File:Route33.jpeg| | [[File:Linearroute.png|200px]] [[File:Anhang 1 (2).jpeg|200px]][[File:razm.jpeg|200px]][[File:rotgelbrauml.jpeg|200px]][[File:Hintergrund.png|200px]][[File:Sketcch.jpeg|200px]][[File:Sketccch.jpeg|200px]][[File:3dcollage.jpeg|200px]][[File:Route33.jpeg|100px]] | ||
edits