Ich bin noch ganz neu mit diesem Arduino-Zeugs und habe daher leider praktisch gar keine Ahnung wie man das richtige Programm zum laufen bringt.
Die Idee war ab einem bestimmten Feuchtigkeitsgrad (welche jede Stunde gecheckt wird) die Pumpe anlaufen zu lassen um eine kleine Pflanzen zu bewässern.
Das jetzige Programm ist so (Ja, die Profis unter euch dürfen lauthals lachen :D):
/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the serial monitor.
Attach the center pin of a potentiometer to pin A0, and the outside pins to
+5V and ground.
This example code is in the public domain.
*/
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop()
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read: Serial.println(sensorValue);
delay(3600000); // delay in between reads for stability
if (sensorValue > 500) //Wert ändern
{
void loop() digitalWrite(13, HIGH); // System mit Wasser füllen.
delay(2000);
digitalWrite(13, LOW);
delay(30000); // Halbe Minute warten, Wassermenge ablesen
for (int i=0; i<40; i++){
digitalWrite(13, HIGH); // Messung
delay(25);
digitalWrite(13, LOW);
delay(100);
}
delay(1000); // Eine Stunde warten
// do something here
}
}
Ganz ehrlich weiß ich nicht wie ich das hinbekommen soll, da ich nicht weiß wie es irgendwie klappt. ![]()
Hoffe jemand hat eine Idee, wie mein Programm und damit meine Pumpe+Feutigkeitssensor laufen kann. :o