Guest User

Untitled

a guest
Nov 19th, 2019
79
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