SHARE
TWEET

Untitled

a guest Nov 19th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int messwert=0;
  2. int Wasserpumpe = 3;
  3.  
  4. void setup() {
  5.   // put your setup code here, to run once:
  6. pinMode(Wasserpumpe,OUTPUT);
  7.   Serial.begin(9600);
  8. }
  9.  
  10. void loop() {
  11.   // put your main code here, to run repeatedly:
  12. messwert=analogRead(A0);
  13.   Serial.print("Feuchtigkeits-Messwert:");
  14.   Serial.println(messwert);
  15.   delay(500);
  16.  
  17.   if (messwert >700){
  18.     digitalWrite (Wasserpumpe, HIGH);
  19.     delay(7000);
  20.   } else {
  21.     digitalWrite (Wasserpumpe, LOW);
  22.   }
  23.  
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top