397
edits
No edit summary |
|||
Line 19: | Line 19: | ||
This work was funded by the Bauhaus University Summaery Fonds and was shown at the Bauhaus University Summaery 2022 | This work was funded by the Bauhaus University Summaery Fonds and was shown at the Bauhaus University Summaery 2022 | ||
[[File:phonGardDiagramm.png|1000px]] | |||
[[File:doc1.jpg|1000px]] | |||
[[File:doc2.JPG|1000px]] | |||
[[File:doc3.JPG|1000px]] | |||
[[File:doc4.JPG|1000px]] | |||
[[File:doc5.JPG|1000px]] | |||
[[File:doc6.JPG|1000px]] | |||
[[File:doc7.JPG|1000px]] | |||
void setup() { | |||
Serial.begin(9600); | |||
//start Serial | |||
} | |||
void loop() { | |||
int elPot = analogRead (A0); | |||
//read A0 (connected to plant) | |||
// elPot is the relative strenght of electric potential measured | |||
int potMap = map (elPot, 0, 1023, 1000, 2500); | |||
//scale full range of potential to 1000-2500 Hz (freq) | |||
tone(7, potMap); | |||
// sonify (pin7 connected to speaker) mapped electric potential | |||
Serial.print ("electric potential"); | |||
Serial.println (elPot); | |||
// print relative electric potential to sserial plotter | |||
Serial.print (potMap); | |||
Serial.println ("Hz"); | |||
// print the frequency of the sonification to the serial plotteer | |||
} | |||
edits